aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2025-11-03 18:21:53 +0500
committerKonstantin Lebedev <9497591+kmlebedev@users.noreply.github.com>2025-11-03 18:21:53 +0500
commitbff703e126c7e560734f274d36426f08e2b608aa (patch)
tree382876c648d327757c2133e6b9a966a62a11c1bc
parente2b43c0b5e752633b24af99bc34c3e7fe2979a1f (diff)
downloadseaweedfs-bff703e126c7e560734f274d36426f08e2b608aa.tar.xz
seaweedfs-bff703e126c7e560734f274d36426f08e2b608aa.zip
fix locationPrefix for updateEntriesTTL
-rw-r--r--weed/s3api/s3api_bucket_handlers.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/s3api/s3api_bucket_handlers.go b/weed/s3api/s3api_bucket_handlers.go
index e204ea2e0..32bfc2832 100644
--- a/weed/s3api/s3api_bucket_handlers.go
+++ b/weed/s3api/s3api_bucket_handlers.go
@@ -613,7 +613,7 @@ func (s3a *S3ApiServer) PutBucketLifecycleConfigurationHandler(w http.ResponseWr
if rule.Expiration.Days == 0 {
continue
}
-
+ locationPrefix := fmt.Sprintf("%s/%s/%s", s3a.option.BucketsPath, bucket, rulePrefix)
locConf := &filer_pb.FilerConf_PathConf{
LocationPrefix: fmt.Sprintf("%s/%s/%s", s3a.option.BucketsPath, bucket, rulePrefix),
Collection: collectionName,
@@ -627,9 +627,8 @@ func (s3a *S3ApiServer) PutBucketLifecycleConfigurationHandler(w http.ResponseWr
s3err.WriteErrorResponse(w, r, s3err.ErrInternalError)
return
}
- parentDirectoryPath := fmt.Sprintf("%s/%s", s3a.option.BucketsPath, bucket)
ttlSec := int32((time.Duration(rule.Expiration.Days) * 24 * time.Hour).Seconds())
- if updErr := s3a.updateEntriesTTL(parentDirectoryPath, ttlSec); updErr != nil {
+ if updErr := s3a.updateEntriesTTL(locationPrefix, ttlSec); updErr != nil {
glog.Errorf("PutBucketLifecycleConfigurationHandler update: %s", err)
}
changed = true