get, set and add path conf

This commit is contained in:
chrislu
2024-07-20 11:27:11 -07:00
parent 96af571219
commit aed2a18223
3 changed files with 25 additions and 3 deletions

View File

@@ -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
}
}