2013-08-21 04:17:06 +03:00
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Linq;
|
|
|
|
using System.Text;
|
2013-08-27 22:13:11 +03:00
|
|
|
using NzbDrone.Common.EnvironmentInfo;
|
2013-08-21 04:17:06 +03:00
|
|
|
|
|
|
|
namespace NzbDrone.Common
|
|
|
|
{
|
|
|
|
public class PathEqualityComparer : IEqualityComparer<String>
|
|
|
|
{
|
|
|
|
public bool Equals(string x, string y)
|
|
|
|
{
|
|
|
|
return x.PathEquals(y);
|
|
|
|
}
|
|
|
|
|
|
|
|
public int GetHashCode(string obj)
|
|
|
|
{
|
2013-08-27 22:13:11 +03:00
|
|
|
if (OsInfo.IsLinux)
|
|
|
|
{
|
|
|
|
return obj.CleanFilePath().GetHashCode();
|
|
|
|
}
|
|
|
|
|
|
|
|
return obj.CleanFilePath().ToLower().GetHashCode();
|
2013-08-21 04:17:06 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|