From 39865c0d2e50209278ee7949e0484e6e44b406b2 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas Date: Wed, 18 May 2016 00:14:32 +0530 Subject: [PATCH] XL/Multipart: Fix list multipart output. (#1661) Fixes #1541 --- object-common-multipart.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/object-common-multipart.go b/object-common-multipart.go index 81c9116bd..5f9a2b770 100644 --- a/object-common-multipart.go +++ b/object-common-multipart.go @@ -423,8 +423,12 @@ func listMultipartUploadsCommon(layer ObjectLayer, bucket, prefix, keyMarker, up result.MaxUploads = maxUploads // Not using path.Join() as it strips off the trailing '/'. - // Also bucket should always be followed by '/' even if prefix is empty. multipartPrefixPath := pathJoin(mpartMetaPrefix, pathJoin(bucket, prefix)) + if prefix == "" { + // Should have a trailing "/" if prefix is "" + // For ex. multipartPrefixPath should be "multipart/bucket/" if prefix is "" + multipartPrefixPath += slashSeparator + } multipartMarkerPath := "" if keyMarker != "" { keyMarkerPath := pathJoin(pathJoin(bucket, keyMarker), uploadIDMarker)