mirror of
https://github.com/minio/minio.git
synced 2024-12-24 06:05:55 -05:00
Return if paths are empty in DeleteFileBulk (#8085)
This avoids a network call, also fixes an issue when empty paths are passed the underlying call fails with "405 Method Not Allowed". This is reproducible when you are deleting a non-existent object. Fixes #8083
This commit is contained in:
parent
825e29f301
commit
6e7962bf35
@ -374,6 +374,9 @@ func (client *storageRESTClient) DeleteFile(volume, path string) error {
|
||||
|
||||
// DeleteFileBulk - deletes files in bulk.
|
||||
func (client *storageRESTClient) DeleteFileBulk(volume string, paths []string) (errs []error, err error) {
|
||||
if len(paths) == 0 {
|
||||
return errs, err
|
||||
}
|
||||
errs = make([]error, len(paths))
|
||||
values := make(url.Values)
|
||||
values.Set(storageRESTVolume, volume)
|
||||
|
Loading…
Reference in New Issue
Block a user