summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/minio/minio-go/api-remove.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/minio/minio-go/api-remove.go')
-rw-r--r--vendor/github.com/minio/minio-go/api-remove.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/github.com/minio/minio-go/api-remove.go b/vendor/github.com/minio/minio-go/api-remove.go
index 110a73e99..2ca84458e 100644
--- a/vendor/github.com/minio/minio-go/api-remove.go
+++ b/vendor/github.com/minio/minio-go/api-remove.go
@@ -71,6 +71,13 @@ func (c Client) RemoveObject(bucketName, objectName string) error {
if err != nil {
return err
}
+ if resp != nil {
+ // if some unexpected error happened and max retry is reached, we want to let client know
+ if resp.StatusCode != http.StatusNoContent {
+ return httpRespToErrorResponse(resp, bucketName, objectName)
+ }
+ }
+
// DeleteObject always responds with http '204' even for
// objects which do not exist. So no need to handle them
// specifically.
@@ -164,6 +171,10 @@ func (c Client) RemoveObjects(bucketName string, objectsCh <-chan string) <-chan
break
}
}
+ if count == 0 {
+ // Multi Objects Delete API doesn't accept empty object list, quit immediatly
+ break
+ }
if count < maxEntries {
// We didn't have 1000 entries, so this is the last batch
finish = true