aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2021-01-11 03:50:45 -0800
committerChris Lu <chris.lu@gmail.com>2021-01-11 03:50:45 -0800
commit8a7302ce377dd24a789b11b83a921dc974050947 (patch)
tree1dc6066c781c369ce7fafc96eb81e1f11cdd8f69
parent2c7148cd550ebd6cd6b25223fc8cbba575758a47 (diff)
downloadseaweedfs-8a7302ce377dd24a789b11b83a921dc974050947.tar.xz
seaweedfs-8a7302ce377dd24a789b11b83a921dc974050947.zip
s3: KeyCount is zero
fix https://github.com/chrislusf/seaweedfs/issues/1741
-rw-r--r--weed/s3api/s3api_objects_list_handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/s3api/s3api_objects_list_handlers.go b/weed/s3api/s3api_objects_list_handlers.go
index fb1497b78..2d36c6ec9 100644
--- a/weed/s3api/s3api_objects_list_handlers.go
+++ b/weed/s3api/s3api_objects_list_handlers.go
@@ -71,7 +71,7 @@ func (s3a *S3ApiServer) ListObjectsV2Handler(w http.ResponseWriter, r *http.Requ
ContinuationToken: continuationToken,
Delimiter: response.Delimiter,
IsTruncated: response.IsTruncated,
- KeyCount: len(response.Contents),
+ KeyCount: len(response.Contents) + len(response.CommonPrefixes),
MaxKeys: response.MaxKeys,
NextContinuationToken: response.NextMarker,
Prefix: response.Prefix,