mirror of
https://github.com/znc/znc.git
synced 2026-08-10 10:52:59 +02:00
Display a better error message if znc.conf cannot be opened
If znc.conf was a regular file which we just couldn't open (chmod 0), ZNC reported that it was already running on this config. This patch fixes this message. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1033 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
@@ -903,7 +903,13 @@ bool CZNC::DoRehash(CString& sError)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_LockFile.TryExLock(m_sConfigFile)) {
|
||||
if (!m_LockFile.Open(m_sConfigFile)) {
|
||||
sError = "Can not open config file";
|
||||
CUtils::PrintStatus(false, sError);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!m_LockFile.TryExLock()) {
|
||||
sError = "ZNC is already running on this config.";
|
||||
CUtils::PrintStatus(false, sError);
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user