From 9de8fefa90444180359e057fa29a179167b1bdc2 Mon Sep 17 00:00:00 2001 From: Krishna Srinivas <634494+krishnasrinivas@users.noreply.github.com> Date: Tue, 8 May 2018 19:08:47 -0700 Subject: [PATCH] Fix azure list-objects not to list minio.sys.tmp/ (#5895) --- cmd/gateway/azure/gateway-azure.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/gateway/azure/gateway-azure.go b/cmd/gateway/azure/gateway-azure.go index 1c46c8296..7af92a931 100644 --- a/cmd/gateway/azure/gateway-azure.go +++ b/cmd/gateway/azure/gateway-azure.go @@ -551,7 +551,7 @@ func (a *azureObjects) ListObjects(ctx context.Context, bucket, prefix, marker, } for _, blob := range resp.Blobs { - if strings.HasPrefix(blob.Name, minio.GatewayMinioSysTmp) { + if delimiter == "" && strings.HasPrefix(blob.Name, minio.GatewayMinioSysTmp) { // We filter out minio.GatewayMinioSysTmp entries in the recursive listing. continue } @@ -572,7 +572,7 @@ func (a *azureObjects) ListObjects(ctx context.Context, bucket, prefix, marker, } for _, blobPrefix := range resp.BlobPrefixes { - if prefix == minio.GatewayMinioSysTmp { + if blobPrefix == minio.GatewayMinioSysTmp { // We don't do strings.HasPrefix(blob.Name, minio.GatewayMinioSysTmp) here so that // we can use tools like mc to inspect the contents of minio.sys.tmp/ // It is OK to allow listing of minio.sys.tmp/ in non-recursive mode as it aids in debugging.