Ensure LoadOszIntoOsu returns actual imported map

This commit is contained in:
Bartłomiej Dach 2020-11-01 14:25:33 +01:00
parent 7d090e0d2e
commit 8a54fdd4e6
1 changed files with 2 additions and 4 deletions

View File

@ -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)