Skip to content

Commit 68a9eea

Browse files
authored
Fix: do not check if object listed equals object being removed (minio#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 minio#2746
1 parent 5729a01 commit 68a9eea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: cmd/stat.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func statURL(targetURL string, isIncomplete, isRecursive bool, encKeyDB map[stri
155155
}
156156
url := targetAlias + getKey(content)
157157

158-
if !isRecursive && url != targetURL {
158+
if !isRecursive && !strings.HasPrefix(url, targetURL) {
159159
return nil, errTargetNotFound(targetURL)
160160
}
161161

0 commit comments

Comments
 (0)