Skip to content

Commit

Permalink
check for error before accessing s3 response (#10)
Browse files Browse the repository at this point in the history
Signed-off-by: Haytham Abuelfutuh <haytham@afutuh.com>
  • Loading branch information
EngHabu authored Oct 24, 2023
1 parent 2b4d0dc commit d829e76
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion s3/container.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,9 @@ func (c *container) Put(name string, r io.Reader, size int64, metadata map[strin
Key: aws.String(name),
Bucket: aws.String(c.name),
})

var etag string
if i.ETag != nil && err == nil {
if err == nil && i.ETag != nil {
etag = cleanEtag(*i.ETag)
}

Expand Down

0 comments on commit d829e76

Please sign in to comment.