From 0a3c01884209064e7e8a31c0b46b51c108d36691 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 15 Jul 2016 21:56:00 +0100 Subject: WinGui: Case sensitivity fix for checking queue duplicates --- win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'win/CS') 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 /// 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; } /// -- cgit v1.2.3