diff options
author | sr55 <[email protected]> | 2016-07-15 21:56:00 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2016-07-15 21:56:08 +0100 |
commit | 0a3c01884209064e7e8a31c0b46b51c108d36691 (patch) | |
tree | acedc9e77cc8f95ac1f9e3b2f79fc3e5b1f03518 /win/CS/HandBrakeWPF | |
parent | 5fce5ceecf4936e849d29b7e5c33cb12203e490d (diff) |
WinGui: Case sensitivity fix for checking queue duplicates
Diffstat (limited to 'win/CS/HandBrakeWPF')
-rw-r--r-- | win/CS/HandBrakeWPF/Services/Queue/QueueProcessor.cs | 14 |
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>
|