1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-30 13:30:57 +08:00

Merge pull request #32327 from peppy/touch-realm-before-using

Ensure realm database file is touched on startup
This commit is contained in:
Dan Balasescu
2025-03-11 17:33:18 +09:00
committed by GitHub
Unverified
+11
View File
@@ -315,6 +315,17 @@ namespace osu.Game.Database
attemptRecoverFromFile(newerVersionFilename);
}
try
{
// Some platforms' realm implementation (including windows) don't update modified time on open.
// Let's do this explicitly as some users may depend on it roughly aligning to usage expectations.
string fullPath = storage.GetFullPath(Filename);
var fi = new FileInfo(fullPath);
if (fi.Exists)
fi.LastWriteTime = DateTime.Now;
}
catch { }
try
{
return getRealmInstance();