1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 19:22:54 +08:00

Move exists check inside retry operation

Might help?
This commit is contained in:
Dean Herbert 2024-04-30 12:39:18 +08:00
parent 1c1ee22aa7
commit a8416f3572
No known key found for this signature in database

View File

@ -307,17 +307,17 @@ namespace osu.Game.Database
// Realms.Exceptions.RealmException: SetEndOfFile() failed: unknown error (1224)
//
// which can occur due to file handles still being open by a previous instance.
if (storage.Exists(Filename))
//
// If this fails we allow it to block game startup. It's better than any alternative we can offer.
FileUtils.AttemptOperation(() =>
{
// If this fails we allow it to block game startup.
// It's better than any alternative we can offer.
FileUtils.AttemptOperation(() =>
if (storage.Exists(Filename))
{
using (var _ = storage.GetStream(Filename, FileAccess.ReadWrite))
{
}
});
}
}
});
string newerVersionFilename = $"{Filename.Replace(realm_extension, string.Empty)}_newer_version{realm_extension}";