From 4ddf93baa5838c7d1a3adbed041df0ced33b8d1c Mon Sep 17 00:00:00 2001 From: Harshavardhana Date: Thu, 11 Jun 2015 20:39:49 -0700 Subject: [PATCH] Make sure the AppVersion set is a proper formatted time string --- common-methods.go | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/common-methods.go b/common-methods.go index 51887e36..384d7099 100644 --- a/common-methods.go +++ b/common-methods.go @@ -113,10 +113,20 @@ func getNewClient(urlStr string, auth *hostConfig) (clnt client.Client, err erro return nil, iodine.New(errInvalidArgument{}, nil) } s3Config := new(s3.Config) - s3Config.AccessKeyID = auth.AccessKeyID - s3Config.SecretAccessKey = auth.SecretAccessKey + s3Config.AccessKeyID = func() string { + if auth.AccessKeyID == globalAccessKeyID { + return "" + } + return auth.AccessKeyID + }() + s3Config.SecretAccessKey = func() string { + if auth.SecretAccessKey == globalSecretAccessKey { + return "" + } + return auth.SecretAccessKey + }() s3Config.AppName = "Minio" - s3Config.AppVersion = Version + s3Config.AppVersion = getVersion() s3Config.AppComments = []string{os.Args[0], runtime.GOOS, runtime.GOARCH} s3Config.HostURL = urlStr s3Config.Debug = globalDebugFlag