diff options
author | sr55 <[email protected]> | 2012-03-28 20:32:30 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2012-03-28 20:32:30 +0000 |
commit | e6ad8939280db7f3f1cdd44c87e884ed572ca054 (patch) | |
tree | 03b7cd6a35d1200018c8afb00cfba19042d183dc /win/CS | |
parent | 6ebb6203b59aecb21d502788f3390a5ca2d51cd1 (diff) |
WinGui: Add code to overwrite corrupted settings file.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4548 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS')
-rw-r--r-- | win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs index c36b5ec49..9419efefc 100644 --- a/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs +++ b/win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs @@ -153,6 +153,15 @@ namespace HandBrake.ApplicationServices.Services }
catch (Exception exc)
{
+ this.userSettings = this.GetDefaults();
+ try
+ {
+ this.Save();
+ }
+ catch (Exception)
+ {
+ }
+
throw new GeneralApplicationException(
"HandBrake has detected corruption in the settings file. User settings will now be reset to defaults.",
"Please restart HandBrake before continuing.",
|