OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 13 May 2009 20:16:32 +0000 (20:16 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Wed, 13 May 2009 20:16:32 +0000 (20:16 +0000)
- Create a log file directory if one doesn't exist on start-up.
- Always create presets.xml if the file doesn't exist. (not only if the HandBrake AppData folder doesn't exist)

git-svn-id: svn://localhost/HandBrake/trunk@2418 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Program.cs

index ecc9c02..f2bae96 100644 (file)
@@ -41,8 +41,14 @@ namespace Handbrake
             {\r
                 string appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake";\r
                 if (!Directory.Exists(appDir))\r
+                    Directory.CreateDirectory(appDir);\r
+\r
+                string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs";\r
+                if (!Directory.Exists(logDir))\r
+                    Directory.CreateDirectory(logDir);\r
+\r
+                if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml"))\r
                 {\r
-                    Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) +  "\\HandBrake");\r
                     PresetsHandler x = new PresetsHandler();\r
                     x.updateBuiltInPresets();\r
                 }\r