mirror of https://github.com/ppy/osu
Merge pull request #3478 from peppy/fix-case-sensitivity-import-extensions
Fix files with upper-case extensions failing to import correctly
This commit is contained in:
commit
5197bf77e4
|
@ -37,7 +37,7 @@ public async Task ImportAsync(string path)
|
|||
return;
|
||||
}
|
||||
|
||||
if (importer.HandledExtensions.Contains(Path.GetExtension(path)))
|
||||
if (importer.HandledExtensions.Contains(Path.GetExtension(path)?.ToLowerInvariant()))
|
||||
importer.Import(path);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -243,7 +243,7 @@ public override void SetHost(GameHost host)
|
|||
|
||||
public void Import(params string[] paths)
|
||||
{
|
||||
var extension = Path.GetExtension(paths.First());
|
||||
var extension = Path.GetExtension(paths.First())?.ToLowerInvariant();
|
||||
|
||||
foreach (var importer in fileImporters)
|
||||
if (importer.HandledExtensions.Contains(extension)) importer.Import(paths);
|
||||
|
|
Loading…
Reference in New Issue