mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Keep trying until delete succeeds
Turns out it can fail if file handles are still open.
This commit is contained in:
@ -97,8 +97,18 @@ namespace osu.Game
|
||||
}
|
||||
catch (MigrationFailedException)
|
||||
{
|
||||
using (var context = contextFactory.GetContext())
|
||||
context.Database.EnsureDeleted();
|
||||
while (true)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var context = contextFactory.GetContext())
|
||||
{
|
||||
context.Database.EnsureDeleted();
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
using (var context = contextFactory.GetContext())
|
||||
context.Migrate();
|
||||
}
|
||||
|
Reference in New Issue
Block a user