Speedier unmapped folders lookup.

This commit is contained in:
Mark McDowall 2013-08-20 18:17:06 -07:00
commit 0c2a1c60b1
5 changed files with 41 additions and 18 deletions

View file

@ -35,11 +35,12 @@ namespace NzbDrone.Common
return info.FullName.TrimEnd('/').Trim('\\', ' ');
}
public static bool PathEquals(this string firstPath, string secondPath)
{
Ensure.That(() => firstPath).IsValidPath();
Ensure.That(() => secondPath).IsValidPath();
if (OsInfo.IsLinux)
{
return String.Equals(firstPath.CleanFilePath(), secondPath.CleanFilePath());
}
return String.Equals(firstPath.CleanFilePath(), secondPath.CleanFilePath(), StringComparison.InvariantCultureIgnoreCase);
}