Skip to content

Commit

Permalink
Merge pull request #1535 from harshavardhana/fix-bug
Browse files Browse the repository at this point in the history
fs: Make sure to negate the seeked offset if size is not negative.
  • Loading branch information
Harshavardhana committed Dec 6, 2015
2 parents 2663de4 + 3782c4a commit 9fed1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/client/fs/fs.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func (f *fsClient) Put(data io.ReadSeeker, size int64, contentType string) *prob
if size < 0 { // Read till EOF.
_, e = io.Copy(partFile, data)
} else { // Read till N bytes.
_, e = io.CopyN(partFile, data, size)
_, e = io.CopyN(partFile, data, size-partSt.Size())
}
if e != nil {
err := f.toClientError(e, objectPartPath)
Expand Down

0 comments on commit 9fed1d7

Please sign in to comment.