From 37e6bbd6aea9c8f5f77d11be180a6c4591e81632 Mon Sep 17 00:00:00 2001 From: Alexey Sokolov Date: Thu, 21 Apr 2011 10:02:15 +0700 Subject: [PATCH] Allow log module to get no arguments. This was broken since znc-0.098-17-g64e565c (563bce5987ca4c24035279126243ea0f5c7b9efa) which introduced possibility of log module to specify wanted path as argument. Thanks to turnor for reporting this. --- modules/extra/log.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/modules/extra/log.cpp b/modules/extra/log.cpp index fac3c3a4..77c720c8 100644 --- a/modules/extra/log.cpp +++ b/modules/extra/log.cpp @@ -128,7 +128,10 @@ bool CLogMod::OnLoad(const CString& sArgs, CString& sMessage) // Add default filename to path if it's a folder if (m_sLogPath.Right(1) == "/" || m_sLogPath.find("$WINDOW")==string::npos) { - m_sLogPath += "/$WINDOW_%Y%m%d.log"; + if (!m_sLogPath.empty()) { + m_sLogPath += "/"; + } + m_sLogPath += "$WINDOW_%Y%m%d.log"; } // Check if it's allowed to write in this path in general