Don't make backup of znc.conf readable by everyone.

It doesn't really matter, since the whole ~/.znc/ is not readable, but
it's better to be safe.
This commit is contained in:
Alexey Sokolov
2013-06-15 21:15:38 +04:00
parent b2dcad5fd4
commit e10b9a1ef5
+4
View File
@@ -249,6 +249,10 @@ bool CFile::Copy(const CString& sOldFileName, const CString& sNewFileName, bool
OldFile.Close();
NewFile.Close();
struct stat st;
GetInfo(sOldFileName, st);
Chmod(sNewFileName, st.st_mode);
return true;
}