From 3ed2b755a34911066814c2ec6299d2e4c75248b0 Mon Sep 17 00:00:00 2001 From: psychon Date: Tue, 27 Jan 2009 19:56:05 +0000 Subject: [PATCH] CFile::TryExLock(): Add O_CREAT to the default parameters The old code in CLockFile automatically created the file too. (Well, it also removed in in this case latter, but meh, so what?) git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1353 726aef4b-f618-498e-8847-2d620e286838 --- FileUtils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FileUtils.h b/FileUtils.h index 1d618185..15f34cc2 100644 --- a/FileUtils.h +++ b/FileUtils.h @@ -116,7 +116,7 @@ public: void Close(); void ClearBuffer(); - bool TryExLock(const CString& sLockFile, int iFlags = O_RDONLY); + bool TryExLock(const CString& sLockFile, int iFlags = O_RDONLY | O_CREAT); bool TryExLock(); bool UnLock();