mirror of
https://github.com/pgsty/minio.git
synced 2026-08-10 16:23:28 +03:00
XL/DeleteObject: delete call on a prefix should not delete the entire tree structure. (#1916)
fixes #1915
This commit is contained in:
committed by
Harshavardhana
parent
f51d34cedd
commit
365f80efa3
@@ -446,6 +446,10 @@ func (xl xlObjects) DeleteObject(bucket, object string) (err error) {
|
||||
nsMutex.Lock(bucket, object)
|
||||
defer nsMutex.Unlock(bucket, object)
|
||||
|
||||
if !xl.isObject(bucket, object) {
|
||||
return ObjectNotFound{bucket, object}
|
||||
}
|
||||
|
||||
if err = xl.deleteObject(bucket, object); err == errFileNotFound {
|
||||
// Its valid to return success if given object is not found.
|
||||
err = nil
|
||||
|
||||
Reference in New Issue
Block a user