From 4a4f1f4d82f872f586e97b09e7f07dd6ed4a7eea Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 27 Feb 2017 18:26:51 +0900 Subject: [PATCH] Actually delete all related database entries, not just the set. --- osu.Game/Database/BeatmapDatabase.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index ff58031c57..fc2c7558b0 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -57,6 +57,18 @@ namespace osu.Game.Database try { storage.Delete(b.Path); + + GetChildren(b, true); + + foreach (var i in b.Beatmaps) + { + if (i.Metadata != null) connection.Delete(i.Metadata); + if (i.BaseDifficulty != null) connection.Delete(i.BaseDifficulty); + + connection.Delete(i); + } + + if (b.Metadata != null) connection.Delete(b.Metadata); connection.Delete(b); } catch (Exception e)