mirror of
https://github.com/znc/znc.git
synced 2026-08-07 09:22:55 +02:00
Make O_RDONLY the default mode when opening files through CFile
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1336 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+1
-1
@@ -387,7 +387,7 @@ private:
|
||||
|
||||
CFile File(sMessages);
|
||||
|
||||
if (sMessages.empty() || !File.Open(O_RDONLY) || !File.ReadFile(sFile))
|
||||
if (sMessages.empty() || !File.Open() || !File.ReadFile(sFile))
|
||||
{
|
||||
PutModule("Unable to find buffer");
|
||||
return(true); // gonna be successful here
|
||||
|
||||
+1
-1
@@ -247,7 +247,7 @@ public:
|
||||
|
||||
CString sBuffer, sScript;
|
||||
CFile cFile(sModule);
|
||||
if (!cFile.Exists() || !cFile.Open(O_RDONLY))
|
||||
if (!cFile.Exists() || !cFile.Open())
|
||||
return false;
|
||||
|
||||
while (cFile.ReadLine(sBuffer))
|
||||
|
||||
@@ -304,7 +304,7 @@ private:
|
||||
|
||||
CFile File(sChannel);
|
||||
|
||||
if (sChannel.empty() || !File.Open(O_RDONLY) || !File.ReadFile(sFile))
|
||||
if (sChannel.empty() || !File.Open() || !File.ReadFile(sFile))
|
||||
return(true); // gonna be successful here
|
||||
|
||||
File.Close();
|
||||
|
||||
Reference in New Issue
Block a user