From 08829ed811b8430bcb3f0d461e6f2e1f10453b53 Mon Sep 17 00:00:00 2001 From: Matt Nadareski Date: Tue, 7 Oct 2025 18:27:12 -0400 Subject: [PATCH] Fix minor issues with options loading --- CHANGELIST.md | 1 + MPF.Frontend/Options.cs | 2 +- MPF.Frontend/Tools/OptionsLoader.cs | 5 +---- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/CHANGELIST.md b/CHANGELIST.md index 27eee81a..9e4a05a7 100644 --- a/CHANGELIST.md +++ b/CHANGELIST.md @@ -23,6 +23,7 @@ - More consistency in commandline programs - Use GC.SharpCompress as archive handling library - Start wiring through log compression changes +- Fix minor issues with options loading ### 3.4.2 (2025-09-30) diff --git a/MPF.Frontend/Options.cs b/MPF.Frontend/Options.cs index 407d1437..70513a4d 100644 --- a/MPF.Frontend/Options.cs +++ b/MPF.Frontend/Options.cs @@ -570,7 +570,7 @@ namespace MPF.Frontend } set { - Settings["InternalProgram"] = value.ToString(); + Settings["LogCompression"] = value.ToString(); } } diff --git a/MPF.Frontend/Tools/OptionsLoader.cs b/MPF.Frontend/Tools/OptionsLoader.cs index 8ef6d0fa..24b86705 100644 --- a/MPF.Frontend/Tools/OptionsLoader.cs +++ b/MPF.Frontend/Tools/OptionsLoader.cs @@ -188,12 +188,9 @@ namespace MPF.Frontend.Tools if (string.IsNullOrEmpty(ConfigurationPath)) return new Options(); - // Ensure the file exists + // If the file does not exist if (!File.Exists(ConfigurationPath) || new FileInfo(ConfigurationPath).Length == 0) - { - File.Create(ConfigurationPath).Dispose(); return new Options(); - } var serializer = JsonSerializer.Create(); var stream = File.Open(ConfigurationPath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);