Skip to content

Commit

Permalink
修复minio升级出现的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
UtilCore committed Jul 1, 2024
1 parent 19590e5 commit 2f16f3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Util.FileStorage.Minio/MinioFileStore.cs
Original file line number Diff line number Diff line change
Expand Up @@ -553,12 +553,12 @@ protected async Task<string> GenerateTempDownloadUrlAsync( ProcessedName fileNam
foreach ( var bucket in buckets ) {
await SafeDeleteBucketAsync( new ProcessedName( bucket ), cancellationToken );
var listObjectsArgs = new ListObjectsArgs().WithBucket( bucket ).WithRecursive( true );
client.ListObjectsAsync( listObjectsArgs, cancellationToken ).Subscribe( item => {
var list = client.ListObjectsEnumAsync(listObjectsArgs, cancellationToken);
await foreach (var item in list.ConfigureAwait(false)) {
var removeObjectArgs = new RemoveObjectArgs().WithBucket( bucket ).WithObject( item.Key );
client.RemoveObjectAsync( removeObjectArgs, cancellationToken ).GetAwaiter();
}, () => {
SafeDeleteBucketAsync( new ProcessedName( bucket ), cancellationToken ).GetAwaiter();
} );
}
SafeDeleteBucketAsync( new ProcessedName( bucket ), cancellationToken ).GetAwaiter();
}
}
}
Expand Down

0 comments on commit 2f16f3f

Please sign in to comment.