Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

s3: ignore directory markers at the root also

Nick Craig-Wooda5c2f2c13816
diff --git a/backend/s3/s3.go b/backend/s3/s3.go
index 2e1f1d574..69614ef06 100644
--- a/backend/s3/s3.go
+++ b/backend/s3/s3.go
@@ -1464,7 +1464,7 @@ func (f *Fs) list(ctx context.Context, bucket, directory, prefix string, addBuck
continue
}
remote = remote[len(prefix):]
- isDirectory := strings.HasSuffix(remote, "/")
+ isDirectory := remote == "" || strings.HasSuffix(remote, "/")
if addBucket {
remote = path.Join(bucket, remote)
}