1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-21 18:47:27 +08:00

Perform check to account for non-ASCII characters

This commit is contained in:
rozukke 2023-03-13 22:01:26 +11:00
parent 20b2d0d4c7
commit 1f7721786b

View File

@ -101,7 +101,8 @@ namespace osu.Game.Skinning
// In both of these cases, the expectation from the user is that the filename or folder name is displayed somewhere to identify the skin.
if (archiveName != item.Name
// lazer exports use this format
&& archiveName != item.GetDisplayString())
// GetValidFilename accounts for skins with non-ASCII characters in the name that have been exported by lazer.
&& archiveName != item.GetDisplayString().GetValidFilename())
item.Name = @$"{item.Name} [{archiveName}]";
}