From 68a9eeae18ffb6b0f15d36cd8e05e2dbc04c75b5 Mon Sep 17 00:00:00 2001 From: kannappanr <30541348+kannappanr@users.noreply.github.com> Date: Tue, 16 Apr 2019 20:44:57 -0700 Subject: [PATCH] Fix: do not check if object listed equals object being removed (#2748) List within the statURL function considers object name as a prefix and lists objects that have the same prefix. currently, it errors out if the object is a subset of another object. This PR will fix this. Fixes #2746 --- cmd/stat.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/stat.go b/cmd/stat.go index 7f577966..89464528 100644 --- a/cmd/stat.go +++ b/cmd/stat.go @@ -155,7 +155,7 @@ func statURL(targetURL string, isIncomplete, isRecursive bool, encKeyDB map[stri } url := targetAlias + getKey(content) - if !isRecursive && url != targetURL { + if !isRecursive && !strings.HasPrefix(url, targetURL) { return nil, errTargetNotFound(targetURL) }