mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 12:23:22 +08:00
Fix crashes on custom skins due to extension-less file lookups
This commit is contained in:
parent
f4ce703490
commit
9062fe1935
@ -22,10 +22,8 @@ namespace osu.Game.Skinning
|
|||||||
if (source.Files == null)
|
if (source.Files == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
bool hasExtension = filename.Contains('.');
|
|
||||||
|
|
||||||
var file = source.Files.Find(f =>
|
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;
|
return file?.FileInfo.StoragePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user