1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 16:13:34 +08:00

Merge pull request #27755 from peppy/fix-import-weirdness

Avoid reporting an import as successful when all beatmaps failed to import
This commit is contained in:
Bartłomiej Dach 2024-03-29 11:25:41 +01:00 committed by GitHub
commit 5371141d3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 0 deletions

View File

@ -12,6 +12,7 @@ using osu.Framework.Testing;
using osu.Game.Beatmaps;
using osu.Game.Database;
using osu.Game.IO;
using osu.Game.Rulesets;
using osu.Game.Tests.Resources;
namespace osu.Game.Tests.Database
@ -77,6 +78,7 @@ namespace osu.Game.Tests.Database
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost())
using (var tmpStorage = new TemporaryNativeStorage("stable-songs-folder"))
using (new RealmRulesetStore(realm, storage))
{
var stableStorage = new StableStorage(tmpStorage.GetFullPath(""), host);
var songsStorage = stableStorage.GetStorageForDirectory(StableStorage.STABLE_DEFAULT_SONGS_PATH);

View File

@ -434,6 +434,9 @@ namespace osu.Game.Beatmaps
}
}
if (!beatmaps.Any())
throw new ArgumentException("No valid beatmap files found in the beatmap archive.");
return beatmaps;
}
}