From d139ad5050159a30280efa7bf209c8eccc6449d6 Mon Sep 17 00:00:00 2001 From: Nicolas Raoul Date: Fri, 18 May 2018 15:31:01 +0900 Subject: [PATCH] Fixed bug when log file path is cutomized in XML file --- CmisSync.Lib/Config.cs | 4 +++- CmisSync.Lib/ConfigManager.cs | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CmisSync.Lib/Config.cs b/CmisSync.Lib/Config.cs index 0f223d3b0..991a411ea 100755 --- a/CmisSync.Lib/Config.cs +++ b/CmisSync.Lib/Config.cs @@ -342,7 +342,9 @@ public void RemoveFolder(string repoName) /// public string GetLogFilePath() { - return Path.Combine(ConfigPath, "CmisSync_log.txt"); + XmlNode appender = configXml.Log4Net.SelectSingleNode("appender"); + XmlNode file = appender.SelectSingleNode("file"); + return file.Attributes["value"].Value; } private string GetLogLevel() diff --git a/CmisSync.Lib/ConfigManager.cs b/CmisSync.Lib/ConfigManager.cs index 15edf86a9..1fbfd77f0 100755 --- a/CmisSync.Lib/ConfigManager.cs +++ b/CmisSync.Lib/ConfigManager.cs @@ -65,7 +65,7 @@ public static string CurrentConfigFile } else { - return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "cmissync", "config.xml"); + return Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "cmissync", "config.xml"); } }