Skip to content

Commit

Permalink
[s3] Fix bucket name in 'getObject' (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
evalphobia authored Oct 19, 2020
1 parent 57df983 commit 1b5e7f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions s3/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@ func (b *Bucket) GetObjectByte(path string) ([]byte, error) {
// getObject fetches object from target S3 path
func (b *Bucket) getObject(path string) (io.Reader, error) {
out, err := b.service.client.GetObject(&SDK.GetObjectInput{
Bucket: &b.name,
Bucket: &b.nameWithPrefix,
Key: &path,
})
if err != nil {
b.service.Errorf("error on `GetObject` operation; bucket=%s; error=%s;", b.name, err.Error())
b.service.Errorf("error on `GetObject` operation; bucket=%s; error=%s;", b.nameWithPrefix, err.Error())
return nil, err
}
return out.Body, nil
Expand Down

0 comments on commit 1b5e7f9

Please sign in to comment.