From ee078cea6ca09131100f93b1e3a0fa827898625d Mon Sep 17 00:00:00 2001 From: Nial <48334675+nmcc1212@users.noreply.github.com> Date: Sat, 11 Oct 2025 14:55:28 +0100 Subject: [PATCH] Fix S3 IAM config handling to simplify checks for configuration presence --- weed/command/server.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/weed/command/server.go b/weed/command/server.go index 3f7850711..e23608f66 100644 --- a/weed/command/server.go +++ b/weed/command/server.go @@ -322,8 +322,8 @@ func runServer(cmd *Command, args []string) bool { } if *isStartingS3 { - if serverIamConfig != nil && *serverIamConfig != "" { - if s3Options.iamConfig == nil || *s3Options.iamConfig == "" { + if *serverIamConfig != "" { + if *s3Options.iamConfig == "" { s3Options.iamConfig = serverIamConfig } else if *s3Options.iamConfig != *serverIamConfig { glog.V(0).Infof("both -s3.iam.config(%s) and -iam.config(%s) provided; using -s3.iam.config", *s3Options.iamConfig, *serverIamConfig)