mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-10-22 14:04:28 +02:00
fmt
This commit is contained in:
1 parent
50d81319a9
commit
eec179ef02
1 file changed
+4
-4
@@ -131,11 +131,11 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque
|
|||||||
// This ensures deletion completes atomically to avoid inconsistent state
|
// This ensures deletion completes atomically to avoid inconsistent state
|
||||||
opCtx := context.WithoutCancel(r.Context())
|
opCtx := context.WithoutCancel(r.Context())
|
||||||
|
|
||||||
// Delete entry with optional empty parent directory cleanup
|
// Delete entry with optional empty parent directory cleanup
|
||||||
bucketPath := fmt.Sprintf("%s/%s", s3a.option.BucketsPath, bucket)
|
bucketPath := fmt.Sprintf("%s/%s", s3a.option.BucketsPath, bucket)
|
||||||
deleteEmptyDirs := !s3a.option.AllowEmptyFolder && strings.LastIndex(object, "/") > 0
|
deleteEmptyDirs := !s3a.option.AllowEmptyFolder && strings.LastIndex(object, "/") > 0
|
||||||
|
|
||||||
return filer_pb.DoRemove(opCtx, client, dir, name, true, false, true, false, nil, deleteEmptyDirs, bucketPath)
|
return filer_pb.DoRemove(opCtx, client, dir, name, true, false, true, false, nil, deleteEmptyDirs, bucketPath)
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
|
||||||
|
|||||||
Reference in new issue
Block a user