diff options
| author | chrislu <chris.lu@gmail.com> | 2025-11-05 22:13:01 -0800 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-11-05 22:13:01 -0800 |
| commit | 50d81319a93b06af8f20b832c25af14178e9bb78 (patch) | |
| tree | c73aecbfc3e5345400225c9d56d9903b03af3105 | |
| parent | 282e0dcbc887f4ed77562b4b4de2c45c98f54414 (diff) | |
| parent | 084b377f8786e3a4d98e0763c3e83be104a9b65e (diff) | |
| download | seaweedfs-50d81319a93b06af8f20b832c25af14178e9bb78.tar.xz seaweedfs-50d81319a93b06af8f20b832c25af14178e9bb78.zip | |
Merge branch 'master' into also-delete-parent-directory-if-empty
| -rw-r--r-- | weed/s3api/s3api_object_handlers_delete.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/s3api/s3api_object_handlers_delete.go b/weed/s3api/s3api_object_handlers_delete.go index c5371f2e2..0c854e9a5 100644 --- a/weed/s3api/s3api_object_handlers_delete.go +++ b/weed/s3api/s3api_object_handlers_delete.go @@ -131,11 +131,11 @@ func (s3a *S3ApiServer) DeleteObjectHandler(w http.ResponseWriter, r *http.Reque // This ensures deletion completes atomically to avoid inconsistent state opCtx := context.WithoutCancel(r.Context()) - // Delete entry with optional empty parent directory cleanup - bucketPath := fmt.Sprintf("%s/%s", s3a.option.BucketsPath, bucket) - deleteEmptyDirs := !s3a.option.AllowEmptyFolder && strings.LastIndex(object, "/") > 0 + // Delete entry with optional empty parent directory cleanup + bucketPath := fmt.Sprintf("%s/%s", s3a.option.BucketsPath, bucket) + 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 { s3err.WriteErrorResponse(w, r, s3err.ErrInternalError) |
