Backblaze / b2-sdk-java

The official Java SDK for using Backblaze's B2 Storage APIs
Other
93 stars 26 forks source link

change getBucketOrNullByName to request specific bucket by name #152

Closed ericjding closed 3 years ago

ericjding commented 3 years ago

The default implementation B2StorageClient::getBucketOrNullByName() fails if the app key capability only has listBuckets capability for a single bucket because it uses listBuckets() and then iterates through all the bucket names. Needs to be changed to instead use B2ListBucketsRequest to specify the bucket name.

Reported in #151

Testing: unit tests