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)