diff options
| author | Chris Lu <chrislusf@users.noreply.github.com> | 2021-03-11 11:01:44 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-11 11:01:44 -0800 |
| commit | d084334ffdd7bfbd43152d91d1d0ab900251a0ba (patch) | |
| tree | f33fd5dd8080cf6480263f6997c521bcb3035172 /weed/s3api/s3api_object_handlers.go | |
| parent | 0e35836cc160676d2be861c000da8f395f2cb0fa (diff) | |
| parent | bb3af2d70b73a02e79e47ba13ba6178d7fe3b562 (diff) | |
| download | seaweedfs-d084334ffdd7bfbd43152d91d1d0ab900251a0ba.tar.xz seaweedfs-d084334ffdd7bfbd43152d91d1d0ab900251a0ba.zip | |
Merge pull request #1883 from kmlebedev/passDelNonEmptyFolder
s3 delete-objects pass OK for fail to delete non-empty folder
Diffstat (limited to 'weed/s3api/s3api_object_handlers.go')
| -rw-r--r-- | weed/s3api/s3api_object_handlers.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go index 36e57b0c8..610daef9f 100644 --- a/weed/s3api/s3api_object_handlers.go +++ b/weed/s3api/s3api_object_handlers.go @@ -5,6 +5,7 @@ import ( "encoding/json" "encoding/xml" "fmt" + "github.com/chrislusf/seaweedfs/weed/filer" "io" "io/ioutil" "net/http" @@ -205,6 +206,8 @@ func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *h if err == nil { directoriesWithDeletion[parentDirectoryPath]++ deletedObjects = append(deletedObjects, object) + } else if strings.Contains(err.Error(), filer.MsgFailDelNonEmptyFolder) { + deletedObjects = append(deletedObjects, object) } else { delete(directoriesWithDeletion, parentDirectoryPath) deleteErrors = append(deleteErrors, DeleteError{ |
