Permalink
Browse files

Merge commit 'refs/pull/396/head' of github.com:znc/znc

  • Loading branch information...
2 parents 958e9ad + 3e1a2d9 commit 04b2d8fabf9b2e7509f7c7c50beaaf7ead2aa154 @DarthGandalf DarthGandalf committed Sep 7, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 modules/log.cpp
View
@@ -97,7 +97,9 @@ void CLogMod::PutLog(const CString& sLine, const CString& sWindow /*= "Status"*/
CFile LogFile(sPath);
CString sLogDir = LogFile.GetDir();
- if (!CFile::Exists(sLogDir)) CDir::MakeDir(sLogDir);
+ struct stat ModDirInfo;
+ CFile::GetInfo(GetSavePath(), ModDirInfo);
+ if (!CFile::Exists(sLogDir)) CDir::MakeDir(sLogDir, ModDirInfo.st_mode);
if (LogFile.Open(O_WRONLY | O_APPEND | O_CREAT))
{
LogFile.Write(CUtils::FormatTime(curtime, "[%H:%M:%S] ", m_pUser->GetTimezone()) + (m_bSanitize ? sLine.StripControls_n() : sLine) + "\n");

0 comments on commit 04b2d8f

Please sign in to comment.