summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2016-07-15 21:56:00 +0100
committersr55 <[email protected]>2016-07-15 21:56:08 +0100
commit0a3c01884209064e7e8a31c0b46b51c108d36691 (patch)
treeacedc9e77cc8f95ac1f9e3b2f79fc3e5b1f03518
parent5fce5ceecf4936e849d29b7e5c33cb12203e490d (diff)
WinGui: Case sensitivity fix for checking queue duplicates
-rw-r--r--win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs14
1 files changed, 13 insertions, 1 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
index 854352c41..3e34bf69f 100644
--- a/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
+++ b/win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs
@@ -274,7 +274,19 @@ namespace HandBrakeWPF.Services.Queue
/// </returns>
public bool CheckForDestinationPathDuplicates(string destination)
{
- return this.queue.Any(job => job.Task != null && job.Status == QueueItemStatus.Waiting && job.Task.Destination != null && job.Task.Destination.Contains(destination.Replace("\\\\", "\\")));
+ foreach (QueueTask job in this.queue)
+ {
+ if (String.Equals(
+ job.Task.Destination,
+ destination.Replace("\\\\", "\\"),
+ StringComparison.OrdinalIgnoreCase)
+ && job.Status == QueueItemStatus.Waiting)
+ {
+ return true;
+ }
+ }
+
+ return false;
}
/// <summary>