mirror of
https://github.com/minio/minio.git
synced 2025-11-21 18:26:04 -05:00
xl: Fix removing an empty directory (#6421)
Removing an empty directory is not working because of xl.DeleteObject() was only checking if the passed prefix is an actual object but it should also check if it is an empty directory.
This commit is contained in:
committed by
Harshavardhana
parent
631c78e655
commit
1961f2ef54
@@ -843,7 +843,7 @@ func (xl xlObjects) DeleteObject(ctx context.Context, bucket, object string) (er
|
||||
return err
|
||||
}
|
||||
|
||||
if !xl.isObject(bucket, object) {
|
||||
if !xl.isObject(bucket, object) && !xl.isObjectDir(bucket, object) {
|
||||
return ObjectNotFound{bucket, object}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user