1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 10:47:28 +08:00

Fix skins getting duplicated when importing after export

Closes #17614.
This commit is contained in:
Dean Herbert 2022-04-11 23:57:27 +09:00
parent 4ab6c11079
commit 82939b0556

View File

@ -104,7 +104,9 @@ namespace osu.Game.Skinning
// For imports, we want to use the archive or folder name as part of the metadata, in addition to any existing skin.ini metadata. // For imports, we want to use the archive or folder name as part of the metadata, in addition to any existing skin.ini metadata.
// In an ideal world, skin.ini would be the only source of metadata, but a lot of skin creators and users don't update it when making modifications. // In an ideal world, skin.ini would be the only source of metadata, but a lot of skin creators and users don't update it when making modifications.
// In both of these cases, the expectation from the user is that the filename or folder name is displayed somewhere to identify the skin. // 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) if (archiveName != item.Name
// lazer exports use this format
&& archiveName != item.GetDisplayString())
item.Name = @$"{item.Name} [{archiveName}]"; item.Name = @$"{item.Name} [{archiveName}]";
} }