mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:42:58 +08:00
catch OperationCanceledException
This commit is contained in:
parent
309e9b24e2
commit
d611603742
@ -76,9 +76,16 @@ namespace osu.Game.Database
|
||||
notification.CompletionClickAction += () => exportStorage.PresentFileExternally(filename);
|
||||
PostNotification?.Invoke(notification);
|
||||
|
||||
using (var stream = exportStorage.CreateFileSafely(filename))
|
||||
try
|
||||
{
|
||||
success = await ExportToStreamAsync(model, stream, notification, cancellationToken ?? notification.CancellationToken).ConfigureAwait(false);
|
||||
using (var stream = exportStorage.CreateFileSafely(filename))
|
||||
{
|
||||
success = await ExportToStreamAsync(model, stream, notification, cancellationToken ?? notification.CancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
success = false;
|
||||
}
|
||||
|
||||
if (!success)
|
||||
|
Loading…
Reference in New Issue
Block a user