fs: Make sure to negate the seeked offset if size is not negative.
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user