From 5dee56d5d08f427b864a131553c09307de4a0f16 Mon Sep 17 00:00:00 2001 From: poornas Date: Thu, 11 Jan 2018 19:53:03 -0800 Subject: [PATCH] fix for prefix based rm (#2354) mc rm --r with prefix not terminated by / doesn't get deleted. example: mc rm --r --force --older-than=10 play/test/prefix Fixes: #2341 --- cmd/client-s3.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/client-s3.go b/cmd/client-s3.go index 306c7b1b..8c9ecdef 100644 --- a/cmd/client-s3.go +++ b/cmd/client-s3.go @@ -1438,7 +1438,7 @@ func (c *s3Client) listRecursiveInRoutineDirOpt(contentCh chan *clientContent, d return } buckets = append(buckets, minio.BucketInfo{Name: bucket, CreationDate: content.Time}) - } else if strings.HasSuffix(object, string(c.targetURL.Separator)) { + } else { // Get stat of given object is a directory. isIncomplete := false isFetchMeta := false