mirror of
https://github.com/osukey/osukey.git
synced 2025-08-08 09:03:50 +09:00
catch when zipWriter dispose
ObjectDisposedException also appear when zipwriter dispose after user request cancel
This commit is contained in:
@ -35,13 +35,13 @@ namespace osu.Game.Database
|
|||||||
/// <param name="cancellationToken">The Cancellation token that can cancel the exporting.</param>
|
/// <param name="cancellationToken">The Cancellation token that can cancel the exporting.</param>
|
||||||
private void exportZipArchive(TModel model, Stream outputStream, ProgressNotification notification, CancellationToken cancellationToken = default)
|
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;
|
float i = 0;
|
||||||
bool fileMissing = false;
|
bool fileMissing = false;
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
foreach (var file in model.Files)
|
foreach (var file in model.Files)
|
||||||
{
|
{
|
||||||
cancellationToken.ThrowIfCancellationRequested();
|
cancellationToken.ThrowIfCancellationRequested();
|
||||||
|
Reference in New Issue
Block a user