mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2024-01-19 02:48:24 +00:00
fixed the problem of empty directory when S3 deleted the directory
This commit is contained in:
parent
1892677b22
commit
8f9f29b773
|
@ -113,7 +113,7 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
|
||||||
bucket, object := getBucketAndObject(r)
|
bucket, object := getBucketAndObject(r)
|
||||||
|
|
||||||
response, _ := s3a.listFilerEntries(bucket, object, 1, "", "/")
|
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)
|
w.WriteHeader(http.StatusNoContent)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue