Merge pull request #405 from peppy/fix-db-deletion

Actually delete all related database entries, not just the set.
This commit is contained in:
Dean Herbert 2017-02-28 07:05:18 +09:00 committed by GitHub
commit 2e84188be7
1 changed files with 12 additions and 0 deletions

View File

@ -57,6 +57,18 @@ private void deletePending()
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)