mirror of
https://github.com/ppy/osu
synced 2024-12-11 17:42:28 +00:00
Fix skin hash repopulation not working since realm migration
This commit is contained in:
parent
5d868c41d4
commit
8c8c5f4c33
@ -210,13 +210,13 @@ namespace osu.Game.Skinning
|
|||||||
{
|
{
|
||||||
using (var realm = ContextFactory.CreateContext())
|
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)
|
foreach (SkinInfo skin in skinsWithoutHashes)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
Update(skin);
|
realm.Write(r => skin.Hash = ComputeHash(skin));
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user