Skip to content

Commit

Permalink
[updates]
Browse files Browse the repository at this point in the history
  • Loading branch information
r-scheele committed Aug 2, 2023
1 parent e9c902a commit abe296e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api-get-object.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,9 @@ func (c *Client) GetObject(ctx context.Context, bucketName, objectName string, o
// Range is set with respect to the offset and length of the buffer requested.
// Do not set objectInfo from the first readAt request because it will not get
// the whole object.
opts.SetRange(req.Offset, req.Offset+int64(len(req.Buffer))-1)
rangeStart := req.Offset
rangeEnd := req.Offset + int64(len(req.Buffer)) - 1
opts.SetRange(rangeStart, rangeEnd)
} else if req.Offset > 0 {
opts.SetRange(req.Offset, 0)
}
Expand Down

0 comments on commit abe296e

Please sign in to comment.