fs: Make sure to negate the seeked offset if size is not negative.

This commit is contained in:
Harshavardhana
2015-12-05 17:52:45 -08:00
parent 2663de4489
commit 3782c4abe0
+1 -1
View File
@@ -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)