aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlimd <limd@sugon.com>2020-09-23 13:33:13 +0800
committerlimd <limd@sugon.com>2020-09-23 13:33:13 +0800
commit8f9f29b7733471369e7d7b41d26a0da41a5fc1fd (patch)
tree882480f60676a6e7abc5418e7187398d66095c45
parent1892677b22188cc2f5c4a495fd727fc9ed75b6b5 (diff)
downloadseaweedfs-8f9f29b7733471369e7d7b41d26a0da41a5fc1fd.tar.xz
seaweedfs-8f9f29b7733471369e7d7b41d26a0da41a5fc1fd.zip
fixed the problem of empty directory when S3 deleted the directory
-rw-r--r--weed/s3api/s3api_object_handlers.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/weed/s3api/s3api_object_handlers.go b/weed/s3api/s3api_object_handlers.go
index 994726565..c5f0dabf6 100644
--- a/weed/s3api/s3api_object_handlers.go
+++ b/weed/s3api/s3api_object_handlers.go
@@ -113,7 +113,7 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
bucket, object := getBucketAndObject(r)
response, _ := s3a.listFilerEntries(bucket, object, 1, "", "/")
- if len(response.Contents) != 0 && strings.HasSuffix(r.URL.Path, "/") {
+ if len(response.Contents) != 0 && strings.HasSuffix(object, "/") {
w.WriteHeader(http.StatusNoContent)
return
}