Skip to content

Commit

Permalink
don't create empty debug log when debugging is not enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sealsrock12 committed Feb 17, 2023
1 parent 0e28920 commit f74c73a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/DebugLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public static async Task StartDebugLog()
}*/
LogText = "";
LogStartTime = DateTime.Now;
if (!File.Exists(LogFilePath))
if (!File.Exists(LogFilePath) && Settings.EnableDebug)
{
File.Create(LogFilePath).Close();
}
else
else if (Settings.EnableDebug)
{
await Task.Run(() => File.WriteAllText(LogFilePath, ""));
}
Expand Down

0 comments on commit f74c73a

Please sign in to comment.