diff --git a/znc.cpp b/znc.cpp index c8616f9f..ec0e7582 100644 --- a/znc.cpp +++ b/znc.cpp @@ -513,6 +513,11 @@ bool CZNC::WriteConfig() { // If Sync() fails... well, let's hope nothing important breaks.. m_LockFile.Sync(); + if (m_LockFile.HadError()) { + DEBUG("Error while writing the config, errno says: " + CString(strerror(errno))); + return false; + } + // We wrote to a temporary name, move it to the right place if (!m_LockFile.Move(GetConfigFile(), true)) return false;