mirror of https://github.com/ppy/osu
Switch casing comparison mode to ordinal
Switch from InvariantCultureIgnoreCase to OrdinalIgnoreCase when checking file paths in archives for substrings indicating the file can be ignored for performance gains. Co-Authored-By: Dan Balasescu <smoogipoo@smgi.me>
This commit is contained in:
parent
c7eb0b401b
commit
4b84564f47
|
@ -58,7 +58,7 @@ public override void Dispose()
|
||||||
archiveStream.Dispose();
|
archiveStream.Dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
private static bool canBeIgnored(IEntry entry) => filename_ignore_list.Any(ignoredName => entry.Key.IndexOf(ignoredName, StringComparison.InvariantCultureIgnoreCase) >= 0);
|
private static bool canBeIgnored(IEntry entry) => filename_ignore_list.Any(ignoredName => entry.Key.IndexOf(ignoredName, StringComparison.OrdinalIgnoreCase) >= 0);
|
||||||
|
|
||||||
public override IEnumerable<string> Filenames => archive.Entries.Where(e => !canBeIgnored(e)).Select(e => e.Key).ToArray();
|
public override IEnumerable<string> Filenames => archive.Entries.Where(e => !canBeIgnored(e)).Select(e => e.Key).ToArray();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue