mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 02:37:08 -07:00
case insensitive match for unmapped folders.
This commit is contained in:
parent
1c62782fcd
commit
c13195046d
6 changed files with 44 additions and 40 deletions
|
@ -1,4 +1,5 @@
|
|||
using System.IO;
|
||||
using System;
|
||||
using System.IO;
|
||||
using NzbDrone.Common.EnsureThat;
|
||||
using NzbDrone.Common.EnvironmentInfo;
|
||||
|
||||
|
@ -35,6 +36,14 @@ namespace NzbDrone.Common
|
|||
}
|
||||
|
||||
|
||||
public static bool PathEquals(this string firstPath, string secondPath)
|
||||
{
|
||||
Ensure.That(() => firstPath).IsValidPath();
|
||||
Ensure.That(() => secondPath).IsValidPath();
|
||||
|
||||
return String.Equals(firstPath.CleanFilePath(), secondPath.CleanFilePath(), StringComparison.InvariantCultureIgnoreCase);
|
||||
}
|
||||
|
||||
public static bool ContainsInvalidPathChars(this string text)
|
||||
{
|
||||
return text.IndexOfAny(Path.GetInvalidPathChars()) >= 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue