From cec2fa66be2e86bb26f7790b202e294e554841fa Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Sun, 18 Aug 2013 15:14:22 +0400 Subject: [PATCH] Don't create folders with \ in log module Also don't try to write files with ? in filename Fix #377 --- modules/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/log.cpp b/modules/log.cpp index 6ea52dc7..1fa7c09b 100644 --- a/modules/log.cpp +++ b/modules/log.cpp @@ -84,7 +84,7 @@ void CLogMod::PutLog(const CString& sLine, const CString& sWindow /*= "Status"*/ // $WINDOW has to be handled last, since it can contain % sPath.Replace("$NETWORK", (m_pNetwork ? m_pNetwork->GetName() : "znc")); - sPath.Replace("$WINDOW", sWindow.Replace_n("/", "?")); + sPath.Replace("$WINDOW", sWindow.Replace_n("/", "-").Replace_n("\\", "-")); sPath.Replace("$USER", (m_pUser ? m_pUser->GetUserName() : "UNKNOWN")); // Check if it's allowed to write in this specific path