summaryrefslogtreecommitdiffstats
path: root/win/CS/HandBrake.ApplicationServices/Services/Encode.cs
diff options
context:
space:
mode:
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)
{