mirror of
https://github.com/minio/mc.git
synced 2025-11-12 01:02:26 +03:00
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
This commit is contained in:
@@ -155,7 +155,7 @@ func statURL(targetURL string, isIncomplete, isRecursive bool, encKeyDB map[stri
|
|||||||
}
|
}
|
||||||
url := targetAlias + getKey(content)
|
url := targetAlias + getKey(content)
|
||||||
|
|
||||||
if !isRecursive && url != targetURL {
|
if !isRecursive && !strings.HasPrefix(url, targetURL) {
|
||||||
return nil, errTargetNotFound(targetURL)
|
return nil, errTargetNotFound(targetURL)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user