mirror of
https://github.com/ppy/osu
synced 2025-02-18 19:36:58 +00:00
catch when zipWriter dispose
ObjectDisposedException also appear when zipwriter dispose after user request cancel
This commit is contained in:
parent
8446e7d841
commit
79715fe37b
@ -35,13 +35,13 @@ namespace osu.Game.Database
|
||||
/// <param name="cancellationToken">The Cancellation token that can cancel the exporting.</param>
|
||||
private void exportZipArchive(TModel model, Stream outputStream, ProgressNotification notification, CancellationToken cancellationToken = default)
|
||||
{
|
||||
using var writer = new ZipWriter(outputStream, new ZipWriterOptions(CompressionType.Deflate));
|
||||
try
|
||||
{
|
||||
var writer = new ZipWriter(outputStream, new ZipWriterOptions(CompressionType.Deflate));
|
||||
|
||||
float i = 0;
|
||||
bool fileMissing = false;
|
||||
|
||||
try
|
||||
{
|
||||
foreach (var file in model.Files)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
Loading…
Reference in New Issue
Block a user