1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 12:42:54 +08:00

Refactor migration precondition to read better

This commit is contained in:
Dean Herbert 2021-12-01 12:48:49 +09:00
parent 370135d484
commit 0e0e8c25e8

View File

@ -63,7 +63,7 @@ namespace osu.Game.Database
using (var transaction = realm.BeginWrite()) using (var transaction = realm.BeginWrite())
{ {
// only migrate data if the realm database is empty. // only migrate data if the realm database is empty.
if (!realm.All<SkinInfo>().Any(s => !s.Protected)) if (realm.All<SkinInfo>().All(s => s.Protected))
{ {
foreach (var skin in existingSkins) foreach (var skin in existingSkins)
{ {