mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-08 23:28:39 +03:00
azblob: container level SAS cannot access container properties
so return the root directory without checking if the bucket exists
This commit is contained in:
@@ -151,10 +151,12 @@ func (fs *AzureBlobFs) ConnectionID() string {
|
|||||||
// Stat returns a FileInfo describing the named file
|
// Stat returns a FileInfo describing the named file
|
||||||
func (fs *AzureBlobFs) Stat(name string) (os.FileInfo, error) {
|
func (fs *AzureBlobFs) Stat(name string) (os.FileInfo, error) {
|
||||||
if name == "" || name == "." {
|
if name == "" || name == "." {
|
||||||
|
if fs.svc != nil {
|
||||||
err := fs.checkIfBucketExists()
|
err := fs.checkIfBucketExists()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return NewFileInfo(name, true, 0, time.Now(), false), nil
|
return NewFileInfo(name, true, 0, time.Now(), false), nil
|
||||||
}
|
}
|
||||||
if fs.config.KeyPrefix == name+"/" {
|
if fs.config.KeyPrefix == name+"/" {
|
||||||
|
|||||||
Reference in New Issue
Block a user