mirror of
https://github.com/SabreTools/MPF.git
synced 2026-07-02 17:24:48 +00:00
Add safety check around empty config files
This commit is contained in:
@@ -62,6 +62,7 @@
|
||||
- Update README to remove AppVeyor references
|
||||
- Remove unused gated using statement
|
||||
- Add alternate config location
|
||||
- Add safety check around empty config files
|
||||
|
||||
### 3.2.4 (2024-11-24)
|
||||
|
||||
|
||||
@@ -298,7 +298,7 @@ namespace MPF.Frontend.Tools
|
||||
return new Options();
|
||||
|
||||
// Ensure the file exists
|
||||
if (!File.Exists(ConfigurationPath))
|
||||
if (!File.Exists(ConfigurationPath) || new FileInfo(ConfigurationPath).Length == 0)
|
||||
{
|
||||
File.Create(ConfigurationPath).Dispose();
|
||||
return new Options();
|
||||
|
||||
Reference in New Issue
Block a user