]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fail a job instantly if the destination folder is missing. Don't spool up...
authorsr55 <sr55.hb@outlook.com>
Mon, 24 Sep 2018 19:57:56 +0000 (20:57 +0100)
committersr55 <sr55.hb@outlook.com>
Mon, 24 Sep 2018 19:57:56 +0000 (20:57 +0100)
win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs

index aa17ea5b06779f7f0f13d99db9b25e50f046d686..5e4726bcb2f1a9fe184767afe5a87cb09313ad47 100644 (file)
@@ -674,6 +674,13 @@ namespace HandBrakeWPF.Services.Queue
                 this.IsProcessing = true;\r
                 this.InvokeQueueChanged(EventArgs.Empty);\r
                 this.InvokeJobProcessingStarted(new QueueProgressEventArgs(job));\r
+\r
+                if (!Directory.Exists(Path.GetDirectoryName(job.Task.Destination)))\r
+                {\r
+                    this.EncodeServiceEncodeCompleted(null, new EncodeCompletedEventArgs(false, null, "Destination Directory Missing", null, null, 0));\r
+                    this.BackupQueue(string.Empty);\r
+                    return;\r
+                }\r
                 this.EncodeService.Start(job.Task, job.Configuration);\r
                 this.BackupQueue(string.Empty);\r
             }\r