azblob: container level SAS cannot access container properties

so return the root directory without checking if the bucket exists
This commit is contained in:
Nicola Murino 2020-11-05 15:03:35 +01:00
parent 36151d1ba9
commit c6ab6f94e7
No known key found for this signature in database
GPG key ID: 2F1FB59433D5A8CB

View file

@ -151,9 +151,11 @@ func (fs *AzureBlobFs) ConnectionID() string {
// Stat returns a FileInfo describing the named file
func (fs *AzureBlobFs) Stat(name string) (os.FileInfo, error) {
if name == "" || name == "." {
err := fs.checkIfBucketExists()
if err != nil {
return nil, err
if fs.svc != nil {
err := fs.checkIfBucketExists()
if err != nil {
return nil, err
}
}
return NewFileInfo(name, true, 0, time.Now(), false), nil
}