From abee110b5dfb185bbaa2accec47235141f33a286 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 13 May 2009 20:16:32 +0000 Subject: WinGui: - 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://svn.handbrake.fr/HandBrake/trunk@2418 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Program.cs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'win/C#/Program.cs') diff --git a/win/C#/Program.cs b/win/C#/Program.cs index ecc9c0281..f2bae9661 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -41,8 +41,14 @@ namespace Handbrake { string appDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake"; if (!Directory.Exists(appDir)) + Directory.CreateDirectory(appDir); + + string logDir = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\logs"; + if (!Directory.Exists(logDir)) + Directory.CreateDirectory(logDir); + + if (!File.Exists(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake\\presets.xml")) { - Directory.CreateDirectory(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\HandBrake"); PresetsHandler x = new PresetsHandler(); x.updateBuiltInPresets(); } -- cgit v1.2.3