Skip to content

Commit 705c3fe

Browse files
committed
Updates Azure Blob Storage SDK usage
Updates the method used to retrieve blobs from Azure Blob Storage to use the GetBlobsOptions object for specifying the prefix. This change ensures compatibility with newer versions of the Azure Blob Storage SDK.
1 parent 762dac2 commit 705c3fe

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Foundatio.AzureStorage/Storage/AzureFileStorage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,7 @@ private async Task<List<FileSpec>> GetFileListAsync(string searchPattern = null,
319319
_logger.LogTrace("Getting file list: Prefix={Prefix} Pattern={Pattern} Limit={Limit}", criteria.Prefix, criteria.Pattern, totalLimit);
320320

321321
var blobs = new List<FileSpec>();
322-
await foreach (var blobItem in _container.GetBlobsAsync(prefix: criteria.Prefix, cancellationToken: cancellationToken))
322+
await foreach (var blobItem in _container.GetBlobsAsync(new GetBlobsOptions { Prefix = criteria.Prefix }, cancellationToken: cancellationToken))
323323
{
324324
// TODO: Verify if it's possible to create empty folders in storage. If so, don't return them.
325325
if (criteria.Pattern != null && !criteria.Pattern.IsMatch(blobItem.Name))
@@ -329,7 +329,6 @@ private async Task<List<FileSpec>> GetFileListAsync(string searchPattern = null,
329329
}
330330

331331
blobs.Add(ToFileInfo(blobItem));
332-
333332
if (blobs.Count >= totalLimit)
334333
break;
335334
}

0 commit comments

Comments
 (0)