diff --git a/osu.Game/Stores/RealmArchiveModelImporter.cs b/osu.Game/Stores/RealmArchiveModelImporter.cs index 353a2164bb..6d1449a4b4 100644 --- a/osu.Game/Stores/RealmArchiveModelImporter.cs +++ b/osu.Game/Stores/RealmArchiveModelImporter.cs @@ -351,8 +351,7 @@ namespace osu.Game.Stores using (var transaction = realm.BeginWrite()) { - if (existing.DeletePending) - UndeleteForReuse(existing); + UndeleteForReuse(existing); transaction.Commit(); } @@ -388,12 +387,7 @@ namespace osu.Game.Stores { LogForModel(item, @$"Found existing {HumanisedModelName} for {item} (ID {existing.ID}) – skipping import."); - if (existing.DeletePending) - { - LogForModel(item, $@"Existing {HumanisedModelName}'s deletion flag has been removed"); - UndeleteForReuse(existing); - } - + UndeleteForReuse(existing); transaction.Commit(); return existing.ToLive(Realm); @@ -539,6 +533,10 @@ namespace osu.Game.Stores /// The existing model. protected virtual void UndeleteForReuse(TModel existing) { + if (!existing.DeletePending) + return; + + LogForModel(existing, $@"Existing {HumanisedModelName}'s deletion flag has been removed to allow for reuse."); existing.DeletePending = false; }