Skip to content

Commit

Permalink
Make sure to cleanup after synchronized realms as well. (#1621)
Browse files Browse the repository at this point in the history
* Make sure to cleanup after synchronized realms as well.

* Don't try to delete if directory doesn't exist
  • Loading branch information
nirinchev authored Nov 4, 2017
1 parent 7cd39a7 commit bb31869
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Realm/Realm/Realm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,11 @@ public static void DeleteRealm(RealmConfigurationBase configuration)
File.Delete(fullpath + ".log");
File.Delete(fullpath + ".lock");
File.Delete(fullpath + ".note");

if (Directory.Exists($"{fullpath}.management"))
{
Directory.Delete($"{fullpath}.management", recursive: true);
}
}

private static bool IsRealmOpen(string path)
Expand Down

0 comments on commit bb31869

Please sign in to comment.