Browse Source

delete the folder object in multi_object_delete

fix https://github.com/chrislusf/seaweedfs/issues/1857
pull/1862/head
Chris Lu 4 years ago
parent
commit
2e89c8c9ae
  1. 2
      weed/s3api/s3api_object_handlers.go

2
weed/s3api/s3api_object_handlers.go

@ -185,7 +185,7 @@ func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *h
for _, object := range deleteObjects.Objects { for _, object := range deleteObjects.Objects {
lastSeparator := strings.LastIndex(object.ObjectName, "/") lastSeparator := strings.LastIndex(object.ObjectName, "/")
parentDirectoryPath, entryName, isDeleteData, isRecursive := "", object.ObjectName, true, false
parentDirectoryPath, entryName, isDeleteData, isRecursive := "", object.ObjectName, true, true
if lastSeparator > 0 && lastSeparator+1 < len(object.ObjectName) { if lastSeparator > 0 && lastSeparator+1 < len(object.ObjectName) {
entryName = object.ObjectName[lastSeparator+1:] entryName = object.ObjectName[lastSeparator+1:]
parentDirectoryPath = "/" + object.ObjectName[:lastSeparator] parentDirectoryPath = "/" + object.ObjectName[:lastSeparator]

Loading…
Cancel
Save