mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use case-insensitve comparator for path
This commit is contained in:
parent
a6b7c5898b
commit
2c36692052
1 changed files with 4 additions and 3 deletions
|
|
@ -31,12 +31,13 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
|
||||
public bool Equals(Result x, Result y)
|
||||
{
|
||||
return x.Title == y.Title && x.SubTitle == y.SubTitle;
|
||||
return x.Title.Equals(y.Title, StringComparison.OrdinalIgnoreCase)
|
||||
&& string.Equals(x.SubTitle, y.SubTitle, StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
|
||||
public int GetHashCode(Result obj)
|
||||
{
|
||||
return HashCode.Combine(obj.Title.GetHashCode(), obj.SubTitle?.GetHashCode() ?? 0);
|
||||
return HashCode.Combine(obj.Title.ToLowerInvariant(), obj.SubTitle?.ToLowerInvariant() ?? "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -118,7 +119,7 @@ namespace Flow.Launcher.Plugin.Explorer.Search
|
|||
{
|
||||
throw new SearchException(engineName, e.Message, e);
|
||||
}
|
||||
|
||||
|
||||
results.RemoveWhere(r => Settings.IndexSearchExcludedSubdirectoryPaths.Any(
|
||||
excludedPath => IsSubPathOf(r.SubTitle, excludedPath.Path)));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue