]> granicus.if.org Git - handbrake/commitdiff
WinGui: Add code to overwrite corrupted settings file.
authorsr55 <sr55.hb@outlook.com>
Wed, 28 Mar 2012 20:32:30 +0000 (20:32 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 28 Mar 2012 20:32:30 +0000 (20:32 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4548 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/HandBrake.ApplicationServices/Services/UserSettingService.cs

index c36b5ec49ac445bfa15ebf87bf583039578ef8b8..9419efefc11365ff124231682dc099c1cc92073a 100644 (file)
@@ -153,6 +153,15 @@ namespace HandBrake.ApplicationServices.Services
             }\r
             catch (Exception exc)\r
             {\r
+                this.userSettings = this.GetDefaults();\r
+                try\r
+                {\r
+                    this.Save();\r
+                }\r
+                catch (Exception)\r
+                {        \r
+                }\r
+                \r
                 throw new GeneralApplicationException(\r
                     "HandBrake has detected corruption in the settings file. User settings will now be reset to defaults.",\r
                     "Please restart HandBrake before continuing.",\r