mirror of https://github.com/ppy/osu
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 @@ protected override void ExportToStream(TModel model, Stream outputStream, Progre
|
|||
/// <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));
|
||||
|
||||
float i = 0;
|
||||
bool fileMissing = false;
|
||||
|
||||
try
|
||||
{
|
||||
var writer = new ZipWriter(outputStream, new ZipWriterOptions(CompressionType.Deflate));
|
||||
|
||||
float i = 0;
|
||||
bool fileMissing = false;
|
||||
|
||||
foreach (var file in model.Files)
|
||||
{
|
||||
cancellationToken.ThrowIfCancellationRequested();
|
||||
|
|
Loading…
Reference in New Issue