diff --git a/osu.Game/Database/LegacyModelExporter.cs b/osu.Game/Database/LegacyModelExporter.cs index 9e0c1e0c6d..824460cdc9 100644 --- a/osu.Game/Database/LegacyModelExporter.cs +++ b/osu.Game/Database/LegacyModelExporter.cs @@ -140,28 +140,20 @@ namespace osu.Game.Database /// The notification will displayed to the user private void exportZipArchive(TModel model, Stream outputStream, ProgressNotification notification) { - try + using (var writer = new ZipWriter(outputStream, new ZipWriterOptions(CompressionType.Deflate))) { - using (var writer = new ZipWriter(outputStream, new ZipWriterOptions(CompressionType.Deflate))) + float i = 0; + + foreach (var file in model.Files) { - float i = 0; + notification.CancellationToken.ThrowIfCancellationRequested(); - foreach (var file in model.Files) - { - notification.CancellationToken.ThrowIfCancellationRequested(); - - writer.Write(file.Filename, UserFileStorage.GetStream(file.File.GetStoragePath())); - i++; - notification.Progress = i / model.Files.Count(); - notification.Text = $"Exporting... ({i}/{model.Files.Count()})"; - } + writer.Write(file.Filename, UserFileStorage.GetStream(file.File.GetStoragePath())); + i++; + notification.Progress = i / model.Files.Count(); + notification.Text = $"Exporting... ({i}/{model.Files.Count()})"; } } - catch (OperationCanceledException) - { - Logger.Log("Export operat canceled"); - throw; - } } } }