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

cmd serve s3: fix ListObjectsV2 response

fhubera3f3fc61ee0f
diff --git a/cmd/serve/s3/list.go b/cmd/serve/s3/list.go
index f58e95a87..559fa14a4 100644
--- a/cmd/serve/s3/list.go
+++ b/cmd/serve/s3/list.go
@@ -28,7 +28,8 @@ func (b *s3Backend) entryListR(_vfs *vfs.VFS, bucket, fdPath, name string, addPr
if entry.IsDir() {
if addPrefix {
- response.AddPrefix(objectPath)
+ prefixWithTrailingSlash := objectPath + "/"
+ response.AddPrefix(prefixWithTrailingSlash)
continue
}
err := b.entryListR(_vfs, bucket, path.Join(fdPath, object), "", false, response)