-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
list_blobs doesn't work at all when delimiter is specified #41
Comments
Here is a quick and dirty fix. Not production code - but the tests should demonstrate the issue. In the other clients, there is a super class which Blobs (and then BlockBlobs, AppendBlobs, PageBlobs) and BlobPrefixes share. |
@makhdumi Thanks for raising the issue. If you are going to submit a fix, we expect the result is still an array. This array can hold two kinds of objects, one is Azure::Storage::Blob, the other one is a string whose value is the prefix value. |
Thanks for your contribution, it's now in latest release. |
When
list_blobs
is called with a delimiter, e.g./
, it does not return any results despite the server returning a valid response.This part in blob_enumeration_results_from_xml doesn't check for
(xml > "Blobs") > "BlobPrefix"
which is what the server returns whendelimiter
is specified.If this is actually an issue, it's very surprising since this use case of
list_blobs
is extremely common and even the default in other client libraries. It's needed when trying to traverse a pseudo-directory structure in blob storage, otherwise, results are returned "flat" or "recursive," and with thousands of blobs, it's not usable.See here the .NET client, where it uses a delimiter (
/
) by default (useFlatBlobListing
is false by default).I would submit a pull request (after signing the CLA) but don't know how you want the results of this returned, given that the results don't represent actual Blobs, just prefixes.
The text was updated successfully, but these errors were encountered: