mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 18:42:56 +08:00
Handle window file access errors
This commit is contained in:
parent
74841cf1a9
commit
b5345235ca
@ -38,10 +38,26 @@ namespace osu.Game.Tests.Database
|
||||
testAction(realmFactory, testStorage);
|
||||
|
||||
realmFactory.Dispose();
|
||||
Logger.Log($"Final database size: {testStorage.GetStream(realmFactory.Filename)?.Length ?? 0}");
|
||||
|
||||
try
|
||||
{
|
||||
Logger.Log($"Final database size: {testStorage.GetStream(realmFactory.Filename)?.Length ?? 0}");
|
||||
}
|
||||
catch
|
||||
{
|
||||
// windows runs may error due to file still being open.
|
||||
}
|
||||
|
||||
realmFactory.Compact();
|
||||
Logger.Log($"Final database size after compact: {testStorage.GetStream(realmFactory.Filename)?.Length ?? 0}");
|
||||
|
||||
try
|
||||
{
|
||||
Logger.Log($"Final database size after compact: {testStorage.GetStream(realmFactory.Filename)?.Length ?? 0}");
|
||||
}
|
||||
catch
|
||||
{
|
||||
// windows runs may error due to file still being open.
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user