mirror of
https://github.com/rclone/rclone.git
synced 2025-06-21 04:08:02 +02:00
cmd serve s3: fix ListObjectsV2 response
add trailing slash to s3 ListObjectsV2 response because some clients expect a trailing forward slash to distinguish if the returned object is a directory Fixes #8464
This commit is contained in:
parent
b8fde4fc46
commit
a3f3fc61ee
@ -28,7 +28,8 @@ func (b *s3Backend) entryListR(_vfs *vfs.VFS, bucket, fdPath, name string, addPr
|
|||||||
|
|
||||||
if entry.IsDir() {
|
if entry.IsDir() {
|
||||||
if addPrefix {
|
if addPrefix {
|
||||||
response.AddPrefix(objectPath)
|
prefixWithTrailingSlash := objectPath + "/"
|
||||||
|
response.AddPrefix(prefixWithTrailingSlash)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
err := b.entryListR(_vfs, bucket, path.Join(fdPath, object), "", false, response)
|
err := b.entryListR(_vfs, bucket, path.Join(fdPath, object), "", false, response)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user