Fix skin hash repopulation not working since realm migration

This commit is contained in:
Dean Herbert 2022-01-12 14:38:37 +09:00
parent 5d868c41d4
commit 8c8c5f4c33

View File

@ -210,13 +210,13 @@ namespace osu.Game.Skinning
{
using (var realm = ContextFactory.CreateContext())
{
var skinsWithoutHashes = realm.All<SkinInfo>().Where(i => string.IsNullOrEmpty(i.Hash)).ToArray();
var skinsWithoutHashes = realm.All<SkinInfo>().Where(i => !i.Protected && string.IsNullOrEmpty(i.Hash)).ToArray();
foreach (SkinInfo skin in skinsWithoutHashes)
{
try
{
Update(skin);
realm.Write(r => skin.Hash = ComputeHash(skin));
}
catch (Exception e)
{