mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
S3 API: set deletion to recursive
fix https://github.com/chrislusf/seaweedfs/issues/1251
This commit is contained in:
parent
1fef598347
commit
86398d1efe
|
@ -173,7 +173,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…
Reference in a new issue