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:
commit
c97db5a863
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user