diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ef1444ffa4..3f865d65f1 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -123,16 +123,15 @@ namespace osu.Game.Database /// Multiple locations on disk public void Import(IEnumerable paths) { - Stack sets = new Stack(); - foreach (string p in paths) + { try { BeatmapSetInfo set = getBeatmapSet(p); //If we have an ID then we already exist in the database. if (set.ID == 0) - sets.Push(set); + Import(new[] { set }); // We may or may not want to delete the file depending on where it is stored. // e.g. reconstructing/repairing database with beatmaps from default storage. @@ -152,9 +151,7 @@ namespace osu.Game.Database e = e.InnerException ?? e; Logger.Error(e, @"Could not import beatmap set"); } - - // Batch commit with multiple sets to database - Import(sets); + } } ///