"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 "Entry doesn't belong in directory" errors when using directory markers
Nick Craig-Wood72b79504ea44
diff --git a/backend/azureblob/azureblob.go b/backend/azureblob/azureblob.goindex ec9756bb7..404b143c0 100644--- a/backend/azureblob/azureblob.go+++ b/backend/azureblob/azureblob.go@@ -1063,11 +1063,7 @@ func (f *Fs) list(ctx context.Context, containerName, directory, prefix string,fs.Debugf(f, "Odd name received %q", remote)continue}- remote = remote[len(prefix):]isDirectory := isDirectoryMarker(*file.Properties.ContentLength, file.Metadata, remote)- if addContainer {- remote = path.Join(containerName, remote)- }if isDirectory {// Don't insert the root directoryif remote == directory {@@ -1076,6 +1072,10 @@ func (f *Fs) list(ctx context.Context, containerName, directory, prefix string,// process directory markers as directoriesremote = strings.TrimRight(remote, "/")}+ remote = remote[len(prefix):]+ if addContainer {+ remote = path.Join(containerName, remote)+ }// Send objecterr = fn(remote, file, isDirectory)if err != nil {