Merge pull request #4103 from ekrctb/taiko-namespace

Fix taiko sample namespace ignored
This commit is contained in:
Dean Herbert 2019-01-22 10:34:36 +09:00 committed by GitHub
commit ca470ffaf0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,9 +101,10 @@ namespace osu.Game.Skinning
bool hasExtension = filename.Contains('.'); bool hasExtension = filename.Contains('.');
string lastPiece = filename.Split('/').Last(); string lastPiece = filename.Split('/').Last();
var legacyName = filename.StartsWith("Gameplay/taiko/") ? "taiko-" + lastPiece : lastPiece;
var file = source.Files.Find(f => var file = source.Files.Find(f =>
string.Equals(hasExtension ? f.Filename : Path.ChangeExtension(f.Filename, null), lastPiece, StringComparison.InvariantCultureIgnoreCase)); string.Equals(hasExtension ? f.Filename : Path.ChangeExtension(f.Filename, null), legacyName, StringComparison.InvariantCultureIgnoreCase));
return file?.FileInfo.StoragePath; return file?.FileInfo.StoragePath;
} }