Use Ordinal comparisons

This commit is contained in:
Ottermandias 2022-06-20 18:26:40 +02:00
parent 47cfaf4da2
commit 6ebf550284
14 changed files with 19 additions and 20 deletions

View file

@ -48,7 +48,7 @@ public partial class ModCollection
// Obtain a collection case-independently by name.
public bool ByName( string name, [NotNullWhen( true )] out ModCollection? collection )
=> _collections.FindFirst( c => string.Equals( c.Name, name, StringComparison.InvariantCultureIgnoreCase ), out collection );
=> _collections.FindFirst( c => string.Equals( c.Name, name, StringComparison.OrdinalIgnoreCase ), out collection );
// Default enumeration skips the empty collection.
public IEnumerator< ModCollection > GetEnumerator()

View file

@ -89,7 +89,7 @@ public partial class ModCollection
}
var iterator = ResolvedFiles
.Where( f => string.Equals( f.Value.Path.FullName, needle, StringComparison.InvariantCultureIgnoreCase ) )
.Where( f => string.Equals( f.Value.Path.FullName, needle, StringComparison.OrdinalIgnoreCase ) )
.Select( kvp => kvp.Key );
// For files that are not rooted, try to add themselves.