mirror of
https://github.com/Radarr/Radarr.git
synced 2024-11-05 10:32:35 +01:00
27 lines
587 B
C#
27 lines
587 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using NzbDrone.Common.EnvironmentInfo;
|
|
|
|
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();
|
|
}
|
|
}
|
|
}
|