aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_object_handlers_delete.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/s3api/s3api_object_handlers_delete.go')
-rw-r--r--weed/s3api/s3api_object_handlers_delete.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/weed/s3api/s3api_object_handlers_delete.go b/weed/s3api/s3api_object_handlers_delete.go
index 7656b9d38..506e7609b 100644
--- a/weed/s3api/s3api_object_handlers_delete.go
+++ b/weed/s3api/s3api_object_handlers_delete.go
@@ -3,12 +3,13 @@ package s3api
import (
"encoding/xml"
"fmt"
- "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
- "golang.org/x/exp/slices"
"io"
"net/http"
"strings"
+ "github.com/seaweedfs/seaweedfs/weed/s3api/s3_constants"
+ "golang.org/x/exp/slices"
+
"github.com/seaweedfs/seaweedfs/weed/filer"
"github.com/seaweedfs/seaweedfs/weed/s3api/s3err"
@@ -157,6 +158,10 @@ func (s3a *S3ApiServer) DeleteMultipleObjectsHandler(w http.ResponseWriter, r *h
}
}
+ if s3a.option.AllowEmptyFolder {
+ return nil
+ }
+
// purge empty folders, only checking folders with deletions
for len(directoriesWithDeletion) > 0 {
directoriesWithDeletion = s3a.doDeleteEmptyDirectories(client, directoriesWithDeletion)