From e6ad8939280db7f3f1cdd44c87e884ed572ca054 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 28 Mar 2012 20:32:30 +0000 Subject: [PATCH] WinGui: Add code to overwrite corrupted settings file. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4548 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Services/UserSettingService.cs | 9 +++++++++ 1 file changed, 9 insertions(+) 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.", -- 2.40.0