mirror of
https://github.com/ppy/osu.git
synced 2025-03-18 22:37:20 +08:00
Keep trying until delete succeeds
Turns out it can fail if file handles are still open.
This commit is contained in:
parent
d9fd05a5af
commit
9b1ed5b3aa
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user