mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 14:42:56 +08:00
Fix imported count incrementing on failures
This commit is contained in:
parent
54497fb1e7
commit
29945f27c5
@ -162,6 +162,7 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
imported.Add(model);
|
imported.Add(model);
|
||||||
|
|
||||||
|
Interlocked.Increment(ref current);
|
||||||
notification.Text = $"Imported {current} of {paths.Length} {humanisedModelName}s";
|
notification.Text = $"Imported {current} of {paths.Length} {humanisedModelName}s";
|
||||||
notification.Progress = (float)current / paths.Length;
|
notification.Progress = (float)current / paths.Length;
|
||||||
}
|
}
|
||||||
@ -174,10 +175,6 @@ namespace osu.Game.Database
|
|||||||
{
|
{
|
||||||
Logger.Error(e, $@"Could not import ({Path.GetFileName(path)})");
|
Logger.Error(e, $@"Could not import ({Path.GetFileName(path)})");
|
||||||
}
|
}
|
||||||
finally
|
|
||||||
{
|
|
||||||
Interlocked.Increment(ref current);
|
|
||||||
}
|
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (imported.Count == 0)
|
if (imported.Count == 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user