Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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.
  • Loading branch information...
commit e10b9a1ef55b8106797a4bd34a3d811568a1f09d 1 parent b2dcad5
@DarthGandalf DarthGandalf authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 src/FileUtils.cpp
View
4 src/FileUtils.cpp
@@ -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;
}
Please sign in to comment.
Something went wrong with that request. Please try again.