mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Added trycatch to settings loading to hook into fallback backup systems
This commit is contained in:
parent
d4782d0ded
commit
5829a7ab93
@ -1,4 +1,4 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -35,9 +35,16 @@ namespace Wabbajack
|
||||
}
|
||||
|
||||
// Version check
|
||||
settings = Consts.SettingsFile.FromJSON<MainSettings>();
|
||||
if (settings.Version == Consts.SettingsVersion)
|
||||
return true;
|
||||
try
|
||||
{
|
||||
settings = Consts.SettingsFile.FromJSON<MainSettings>();
|
||||
if (settings.Version == Consts.SettingsVersion)
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Utils.Error(ex, "Error loading settings");
|
||||
}
|
||||
|
||||
var backup = Consts.SettingsFile.AppendToName("-backup");
|
||||
backup.Delete();
|
||||
|
Loading…
Reference in New Issue
Block a user