Open the ISpoofFile with mode 'O_RDWR|O_CREAT' instead of '(int)true'

This fixes a bug from r1337


git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1352 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
psychon
2009-01-27 19:54:38 +00:00
parent 432a04e545
commit 7ef9f76bb0

View File

@@ -248,7 +248,7 @@ bool CZNC::WriteISpoof(CUser* pUser) {
if (!m_sISpoofFile.empty()) {
m_pISpoofLockFile = new CFile;
if (!m_pISpoofLockFile->TryExLock(m_sISpoofFile, true)) {
if (!m_pISpoofLockFile->TryExLock(m_sISpoofFile, O_RDWR | O_CREAT)) {
delete m_pISpoofLockFile;
m_pISpoofLockFile = NULL;
return false;