1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 14:03:21 +08:00

logic fix?

This commit is contained in:
cdwcgt 2023-02-26 15:28:24 +09:00
parent fdf9544688
commit e8092bff46

View File

@ -87,7 +87,6 @@ namespace osu.Game.Database
Text = "Exporting...",
CompletionText = "Export completed"
};
notification.CompletionClickAction += () => exportStorage.PresentFileExternally(filename);
PostNotification?.Invoke(notification);
try
@ -101,16 +100,20 @@ namespace osu.Game.Database
{
success = false;
}
finally
{
// cleanup if export is failed or canceled.
if (!success)
{
exportStorage.Delete(filename);
}
exporting_models.Remove(model);
// cleanup if export is failed or canceled.
if (!success)
{
exportStorage.Delete(filename);
}
else
{
notification.CompletionText = "Export Complete, Click to open the folder";
notification.CompletionClickAction = () => exportStorage.PresentFileExternally(filename);
notification.State = ProgressNotificationState.Completed;
}
exporting_models.Remove(model);
return success;
}