Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions FluentStorage.AWS/Blobs/AwsS3DirectoryBrowser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ private async Task ListFolderAsync(List<Blob> container, string path, ListOption
Delimiter = options.Recurse ? null : "/" //this tells S3 not to go into the folder recursively
};

// Server side filtering is supported by supplying a FilePrefix
// Server side filtering is supported by supplying a FilePrefix
if (!string.IsNullOrEmpty(options.FilePrefix)) {
request.Prefix += options.FilePrefix;
}
Expand Down Expand Up @@ -103,7 +103,10 @@ public async Task DeleteRecursiveAsync(string fullPath, CancellationToken cancel
if (response?.S3Objects == null)
break;

await Task.WhenAll(response.S3Objects.Select(s3 => _client.DeleteObjectAsync(_bucketName, s3.Key, cancellationToken))).ConfigureAwait(false);
await _client.DeleteObjectsAsync(new DeleteObjectsRequest() {
BucketName = _bucketName,
Objects = response.S3Objects.Select(s3 => new KeyVersion() { Key = s3.Key }).ToList()
}, cancellationToken).ConfigureAwait(false);

if (response.NextContinuationToken == null)
break;
Expand Down