handle corrupted configuration when upgrading.

This commit is contained in:
Paddy Xu
2017-11-15 20:45:11 +02:00
parent 462891951b
commit 03807a1afb

View File

@@ -108,7 +108,14 @@ namespace QuickLook
Updater.CollectAndShowReleaseNotes();
Settings.Default.Upgrade();
try
{
Settings.Default.Upgrade();
}
catch (Exception)
{
TrayIconManager.ShowNotification("", "Configuration file is currupted and has been removed.", true);
}
Settings.Default.Upgraded = false;
Settings.Default.Save();
}