mirror of
https://github.com/rclone/rclone.git
synced 2025-02-11 08:00:33 +01:00
s3: fix bucket Region auto detection when Region unset in config #2915
Previous to this fix if Region was not set and Endpoint was not set then we set the endpoint to "https://s3.amazonaws.com/". This is unecessary because if the Region alone isn't set then we set it to "us-east-1" which has the same endpoint. Having the endpoint set breaks the bucket region auto detection with the error "Failed to update region for bucket: can't set region to "xxx" as endpoint is set". This fix removes that check.
This commit is contained in:
parent
3278b297cf
commit
4f8472664f
@ -1127,9 +1127,6 @@ func s3Connection(opt *Options) (*s3.S3, *session.Session, error) {
|
|||||||
return nil, nil, errors.New("secret_access_key not found")
|
return nil, nil, errors.New("secret_access_key not found")
|
||||||
}
|
}
|
||||||
|
|
||||||
if opt.Region == "" && opt.Endpoint == "" {
|
|
||||||
opt.Endpoint = "https://s3.amazonaws.com/"
|
|
||||||
}
|
|
||||||
if opt.Region == "" {
|
if opt.Region == "" {
|
||||||
opt.Region = "us-east-1"
|
opt.Region = "us-east-1"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user