mirror of
https://github.com/ppy/osu.git
synced 2026-06-01 01:10:22 +08:00
Fix crashes on custom skins due to extension-less file lookups
This commit is contained in:
@@ -22,10 +22,8 @@ namespace osu.Game.Skinning
|
||||
if (source.Files == null)
|
||||
return null;
|
||||
|
||||
bool hasExtension = filename.Contains('.');
|
||||
|
||||
var file = source.Files.Find(f =>
|
||||
string.Equals(hasExtension ? f.Filename : Path.ChangeExtension(f.Filename, null), filename, StringComparison.InvariantCultureIgnoreCase));
|
||||
string.Equals(f.Filename, filename, StringComparison.InvariantCultureIgnoreCase));
|
||||
return file?.FileInfo.StoragePath;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user