From 8dd8f02e3c1dbe9246d862484b02b0d09a33ccb2 Mon Sep 17 00:00:00 2001 From: Herp Derpinstine Date: Sat, 13 Feb 2021 19:23:15 -0600 Subject: [PATCH] Cleanup --- Program.cs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Program.cs b/Program.cs index 969f35d..7710ec4 100644 --- a/Program.cs +++ b/Program.cs @@ -91,22 +91,22 @@ internal static void LogError(string msg) TempFileCache.ClearCache(); OperationError(); -#if DEBUG - FinishingMessageBox(msg, MessageBoxButtons.OK, MessageBoxIcon.Error); -#else try { string filePath = Directory.GetCurrentDirectory() + $@"\MLInstaller_{DateTime.Now:yy-M-dd_HH-mm-ss.fff}.log"; File.WriteAllText(filePath, msg); - if (Config.HighlightLogLocation) + if (Config.HighlightLogFileLocation) Process.Start("explorer.exe", $"/select, {filePath}"); +#if DEBUG + FinishingMessageBox(msg, MessageBoxButtons.OK, MessageBoxIcon.Error); +#else FinishingMessageBox($"INTERNAL FAILURE! Please upload the log file \"{filePath}\" when requesting support.", MessageBoxButtons.OK, MessageBoxIcon.Error); +#endif } catch (UnauthorizedAccessException) { FinishingMessageBox($"Couldn't create log file! Try running the Installer as Administrator or run the Installer from a different directory.", MessageBoxButtons.OK, MessageBoxIcon.Error); } -#endif } internal static void OperationError()