- Small tweak to the preset service which might fix the preset loading issue when upgrading to a new version.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3989
b64f7644-9d1e-0410-96f1-
a4d463321fa5
/// </summary>\r
public PresetService()\r
{\r
- // this.Presets = CollectionViewSource.GetDefaultView(this.presets);\r
+ // If the preset file doesn't exist. Create it.\r
+ if (!File.Exists(this.builtInPresetFile))\r
+ {\r
+ this.UpdateBuiltInPresets(string.Empty);\r
+ }\r
+\r
this.LoadPresets();\r
}\r
\r
}\r
\r
reader.Close();\r
- }\r
+ } \r
}\r
catch (Exception exc)\r
{\r
if (!Directory.Exists(logDir))\r
Directory.CreateDirectory(logDir);\r
\r
- if (!File.Exists(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), @"HandBrake\presets.xml")))\r
- {\r
- PresetService x = new PresetService();\r
- x.UpdateBuiltInPresets(string.Empty);\r
- }\r
-\r
Application.EnableVisualStyles();\r
Application.SetCompatibleTextRenderingDefault(false);\r
Application.Run(new frmMain(args));\r