mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Handle window file access errors
This commit is contained in:
@ -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.
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user