"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
azureblob: fix crash with SAS URL and no container - fixes #5820
Nick Craig-Woodc2557cc432c8
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.goindex 8a3b0b36d..5dc7f73af 100644--- a/backend/azureblob/azureblob.go+++ b/backend/azureblob/azureblob.go@@ -1461,6 +1461,10 @@ func (o *Object) clearMetaData() {// o.size// o.md5func (o *Object) readMetaData() (err error) {+ container, _ := o.split()+ if !o.fs.containerOK(container) {+ return fs.ErrorObjectNotFound+ }if !o.modTime.IsZero() {return nil}@@ -1653,7 +1657,10 @@ func (o *Object) Update(ctx context.Context, in io.Reader, src fs.ObjectInfo, opreturn errCantUpdateArchiveTierBlobs}}- container, _ := o.split()+ container, containerPath := o.split()+ if container == "" || containerPath == "" {+ return fmt.Errorf("can't upload to root - need a container")+ }err = o.fs.makeContainer(ctx, container)if err != nil {return err