mirror of
https://github.com/znc/znc.git
synced 2026-05-07 22:04:46 +02:00
Use fchmod() instead of chmod() if the file is already open
git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1316 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+4
-1
@@ -223,7 +223,10 @@ bool CFile::Copy(const CString& sOldFileName, const CString& sNewFileName, bool
|
||||
}
|
||||
|
||||
bool CFile::Chmod(mode_t mode) {
|
||||
return CFile::Chmod(m_sLongName, mode);
|
||||
if (m_iFD == -1) {
|
||||
return false;
|
||||
}
|
||||
return (fchmod(m_iFD, mode) == 0);
|
||||
}
|
||||
|
||||
bool CFile::Chmod(const CString& sFile, mode_t mode) {
|
||||
|
||||
Reference in New Issue
Block a user