diff options
Diffstat (limited to 'weed/shell')
| -rw-r--r-- | weed/shell/command_s3_bucket_quota_check.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/weed/shell/command_s3_bucket_quota_check.go b/weed/shell/command_s3_bucket_quota_check.go index bb54b73a4..c92b52117 100644 --- a/weed/shell/command_s3_bucket_quota_check.go +++ b/weed/shell/command_s3_bucket_quota_check.go @@ -5,10 +5,11 @@ import ( "context" "flag" "fmt" - "github.com/seaweedfs/seaweedfs/weed/filer" - "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" "io" "math" + + "github.com/seaweedfs/seaweedfs/weed/filer" + "github.com/seaweedfs/seaweedfs/weed/pb/filer_pb" ) func init() { @@ -104,7 +105,10 @@ func (c *commandS3BucketQuotaEnforce) Do(args []string, commandEnv *CommandEnv, func (c *commandS3BucketQuotaEnforce) processEachBucket(fc *filer.FilerConf, filerBucketsPath string, entry *filer_pb.Entry, writer io.Writer, collectionSize float64) (hasConfChanges bool) { locPrefix := filerBucketsPath + "/" + entry.Name + "/" - locConf := fc.MatchStorageRule(locPrefix) + existingConf := fc.MatchStorageRule(locPrefix) + + // Create a mutable copy for modification + locConf := filer.ClonePathConf(existingConf) locConf.LocationPrefix = locPrefix if entry.Quota > 0 { |
