mirror of https://github.com/ppy/osu
Ensure LoadOszIntoOsu returns actual imported map
This commit is contained in:
parent
7d090e0d2e
commit
8a54fdd4e6
|
@ -821,15 +821,13 @@ public static async Task<BeatmapSetInfo> LoadOszIntoOsu(OsuGameBase osu, string
|
|||
|
||||
var manager = osu.Dependencies.Get<BeatmapManager>();
|
||||
|
||||
await manager.Import(temp);
|
||||
|
||||
var imported = manager.GetAllUsableBeatmapSets();
|
||||
var importedSet = await manager.Import(temp);
|
||||
|
||||
ensureLoaded(osu);
|
||||
|
||||
waitForOrAssert(() => !File.Exists(temp), "Temporary file still exists after standard import", 5000);
|
||||
|
||||
return imported.LastOrDefault();
|
||||
return manager.GetAllUsableBeatmapSets().Find(beatmapSet => beatmapSet.ID == importedSet.ID);
|
||||
}
|
||||
|
||||
private void deleteBeatmapSet(BeatmapSetInfo imported, OsuGameBase osu)
|
||||
|
|
Loading…
Reference in New Issue