summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2011-04-27 19:40:41 +0000
committersr55 <[email protected]>2011-04-27 19:40:41 +0000
commitf3d48d42f46644795c5a35bf117edaeefe496ca3 (patch)
treec9a7056d0b48c13f20aa7bf687da3441c3177042 /win/CS/HandBrake.ApplicationServices/Services/Encode.cs
parent2d81a5ec8e0851b306b82eea9fead769ff6517b3 (diff)
WinGui:
- Automatically attempt to create destination path if it does not exist when starting an encode. - When adding to queue, it'll optionally ask. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3962 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.ApplicationServices/Services/Encode.cs')
-rw-r--r--win/CS/HandBrake.ApplicationServices/Services/Encode.cs8
1 files changed, 8 insertions, 0 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
index 0208eaf98..9232ea95e 100644
--- a/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
+++ b/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
@@ -169,6 +169,14 @@ namespace HandBrake.ApplicationServices.Services
Win32.PreventSleep();
}
+ // Make sure the path exists, attempt to create it if it doesn't
+ string path = Directory.GetParent(queueTask.Destination).ToString();
+ if (!Directory.Exists(path))
+ {
+ // TODO - Better handle a directoryNotFound exception.
+ Directory.CreateDirectory(path);
+ }
+
string handbrakeCLIPath = Path.Combine(Application.StartupPath, "HandBrakeCLI.exe");
ProcessStartInfo cliStart = new ProcessStartInfo(handbrakeCLIPath, queueTask.Query)
{