diff --git a/osu.Game/Beatmaps/BeatmapManager.cs b/osu.Game/Beatmaps/BeatmapManager.cs
index 105c8d9623..bbb6c975d0 100644
--- a/osu.Game/Beatmaps/BeatmapManager.cs
+++ b/osu.Game/Beatmaps/BeatmapManager.cs
@@ -47,6 +47,8 @@ namespace osu.Game.Beatmaps
private readonly FileStore files;
+ private readonly SQLiteConnection connection;
+
private readonly RulesetStore rulesets;
private readonly BeatmapStore beatmaps;
@@ -72,6 +74,7 @@ namespace osu.Game.Beatmaps
this.storage = storage;
this.files = files;
+ this.connection = connection;
this.rulesets = rulesets;
if (importHost != null)
@@ -141,13 +144,13 @@ namespace osu.Game.Beatmaps
/// The beatmap to be imported.
public BeatmapSetInfo Import(ArchiveReader archiveReader)
{
+ BeatmapSetInfo set = null;
+
// let's only allow one concurrent import at a time for now.
lock (importLock)
- {
- BeatmapSetInfo set = importToStorage(archiveReader);
- Import(set);
- return set;
- }
+ connection.RunInTransaction(() => Import(set = importToStorage(archiveReader)));
+
+ return set;
}
///