1
0
Fork 0
mirror of https://github.com/lidarr/Lidarr synced 2024-12-27 10:07:10 +00:00
Lidarr/NzbDrone.Common/PathEqualityComparer.cs

27 lines
587 B
C#
Raw Normal View History

2013-08-21 01:17:06 +00:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NzbDrone.Common.EnvironmentInfo;
2013-08-21 01:17:06 +00: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)
{
if (OsInfo.IsLinux)
{
return obj.CleanFilePath().GetHashCode();
}
return obj.CleanFilePath().ToLower().GetHashCode();
2013-08-21 01:17:06 +00:00
}
}
}