1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Merge pull request #16431 from peppy/skin-hash-repopulation

Fix skin hash repopulation not working since realm migration
This commit is contained in:
Dan Balasescu 2022-01-12 19:03:56 +09:00 committed by GitHub
commit c97db5a863
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
{