diff --git a/Harmony/Tools/FileLog.cs b/Harmony/Tools/FileLog.cs index 6b309d3a..be28bfc0 100644 --- a/Harmony/Tools/FileLog.cs +++ b/Harmony/Tools/FileLog.cs @@ -47,6 +47,8 @@ public static string LogPath } finally { } } + else + _logPath += ".obsolete"; } return _logPath; } diff --git a/Harmony/Tools/Logger.cs b/Harmony/Tools/Logger.cs index 81481ee8..ad7b20c2 100644 --- a/Harmony/Tools/Logger.cs +++ b/Harmony/Tools/Logger.cs @@ -56,7 +56,7 @@ private static void ToggleDebug() if (Enabled) { if (Writer == null) - Writer = new StreamWriter(File.Create(Path.GetFullPath(FileWriterPath))); + Writer = new StreamWriter(new FileStream(Path.GetFullPath(FileWriterPath),FileMode.Create, FileAccess.Write, FileShare.ReadWrite | FileShare.Delete)); Logger.MessageReceived += OnMessage; } else