Skip to content

Commit

Permalink
Empty locationConstraint for a bucket means that it is in us-east-1. #57
Browse files Browse the repository at this point in the history
  • Loading branch information
fxaguessy committed Feb 21, 2017
1 parent 1214deb commit ecfddff
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cloud/aws/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,12 @@ func (s *Storage) getBucketsPerRegion() ([]*s3.Bucket, error) {
errc <- err
return
}
if awssdk.StringValue(loc.LocationConstraint) == s.region {
switch awssdk.StringValue(loc.LocationConstraint) {
case "":
if s.region == "us-east-1" {
bucketc <- b
}
case s.region:
bucketc <- b
}
}(bucket)
Expand Down

1 comment on commit ecfddff

@simcap
Copy link
Contributor

@simcap simcap commented on ecfddff Feb 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Well done guys!

Please sign in to comment.