summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-09-24 20:57:56 +0100
committersr55 <[email protected]>2018-09-24 20:57:56 +0100
commit1ad9a018a20f39b0addba7a0079f64d120a73984 (patch)
tree835332fa8a437d1c059446cab5dc4bed7ba66af5 /win
parent1d05b00801d8f2c145f94ac9fdbffe6cb1b715c5 (diff)
WinGui: Fail a job instantly if the destination folder is missing. Don't spool up a libhb instance. Provides feedback to the user much faster. #1599
Diffstat (limited to 'win')
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs7
1 files changed, 7 insertions, 0 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
index aa17ea5b0..5e4726bcb 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
@@ -674,6 +674,13 @@ namespace HandBrakeWPF.Services.Queue
this.IsProcessing = true;
this.InvokeQueueChanged(EventArgs.Empty);
this.InvokeJobProcessingStarted(new QueueProgressEventArgs(job));
+
+ if (!Directory.Exists(Path.GetDirectoryName(job.Task.Destination)))
+ {
+ this.EncodeServiceEncodeCompleted(null, new EncodeCompletedEventArgs(false, null, "Destination Directory Missing", null, null, 0));
+ this.BackupQueue(string.Empty);
+ return;
+ }
this.EncodeService.Start(job.Task, job.Configuration);
this.BackupQueue(string.Empty);
}