Fix swallowed err variable in vfs package

This commit is contained in:
Lars Lehtonen 2017-07-18 18:09:39 -07:00
parent d2e5d2064f
commit 4e847ce020
No known key found for this signature in database
GPG Key ID: 8137D474EBCB04F2
1 changed files with 3 additions and 1 deletions

View File

@ -130,7 +130,9 @@ func (s *S3Context) getRegionForBucket(bucket string) (string, error) {
var response *s3.GetBucketLocationOutput
s3Client, err := s.getClient(awsRegion)
if err != nil {
return "", fmt.Errorf("error connecting to S3: %s", err)
}
// Attempt one GetBucketLocation call the "normal" way (i.e. as the bucket owner)
response, err = s3Client.GetBucketLocation(request)