aboutsummaryrefslogtreecommitdiff
path: root/weed/s3api/s3api_bucket_handlers.go
diff options
context:
space:
mode:
authorchrislu <chris.lu@gmail.com>2024-07-20 11:27:11 -0700
committerchrislu <chris.lu@gmail.com>2024-07-20 11:27:11 -0700
commitaed2a18223950a2bf83fba11f0ef27e3f96ad045 (patch)
tree858f3a0e90066bc48df8c4a8cdce4d3606f810fa /weed/s3api/s3api_bucket_handlers.go
parent96af5712195be37b309115795066f17c7cc6126d (diff)
downloadseaweedfs-aed2a18223950a2bf83fba11f0ef27e3f96ad045.tar.xz
seaweedfs-aed2a18223950a2bf83fba11f0ef27e3f96ad045.zip
get, set and add path conf
Diffstat (limited to 'weed/s3api/s3api_bucket_handlers.go')
-rw-r--r--weed/s3api/s3api_bucket_handlers.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go
index f451e60a2..7d0d76ea4 100644
--- a/weed/s3api/s3api_bucket_handlers.go
+++ b/weed/s3api/s3api_bucket_handlers.go
@@ -455,7 +455,11 @@ func (s3a *S3ApiServer) DeleteBucketLifecycleHandler(w http.ResponseWriter, r *h
for prefix, ttl := range collectionTtls {
bucketPrefix := fmt.Sprintf("%s/%s/", s3a.option.BucketsPath, bucket)
if strings.HasPrefix(prefix, bucketPrefix) && strings.HasSuffix(ttl, "d") {
- fc.DeleteLocationConf(prefix)
+ pathConf, found := fc.GetLocationConf(prefix)
+ if found {
+ pathConf.Ttl = ""
+ fc.SetLocationConf(pathConf)
+ }
changed = true
}
}