From cf633ee4355fd1e2d8d2ab97abb0665e49f21d50 Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Tue, 30 Sep 2014 18:28:20 +0100 Subject: [PATCH] [log] $WINDOW should be last because it could contain % Thanks to @NuclearW for spotting --- modules/log.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/log.cpp b/modules/log.cpp index 2ab0d0b6..c8734a3e 100644 --- a/modules/log.cpp +++ b/modules/log.cpp @@ -84,9 +84,9 @@ void CLogMod::PutLog(const CString& sLine, const CString& sWindow /*= "Status"*/ // TODO: Properly handle IRC case mapping // $WINDOW has to be handled last, since it can contain % + sPath.Replace("$USER", CString((m_pUser ? m_pUser->GetUserName() : "UNKNOWN")).AsLower()); sPath.Replace("$NETWORK", CString((m_pNetwork ? m_pNetwork->GetName() : "znc")).AsLower()); sPath.Replace("$WINDOW", CString(sWindow.Replace_n("/", "-").Replace_n("\\", "-")).AsLower()); - sPath.Replace("$USER", CString((m_pUser ? m_pUser->GetUserName() : "UNKNOWN")).AsLower()); // Check if it's allowed to write in this specific path sPath = CDir::CheckPathPrefix(GetSavePath(), sPath);