mirror of
https://github.com/osukey/osukey.git
synced 2025-08-07 00:23:59 +09:00
catch OperationCanceledException
This commit is contained in:
@ -76,9 +76,16 @@ namespace osu.Game.Database
|
|||||||
notification.CompletionClickAction += () => exportStorage.PresentFileExternally(filename);
|
notification.CompletionClickAction += () => exportStorage.PresentFileExternally(filename);
|
||||||
PostNotification?.Invoke(notification);
|
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)
|
if (!success)
|
||||||
|
Reference in New Issue
Block a user