mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 20:32:55 +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…
Reference in New Issue
Block a user