XL/GetObject: offset should be reset to 0 after reading first part. (#1580) (#1581)

This commit is contained in:
Krishna Srinivas 2016-05-10 23:08:12 +05:30 committed by Harshavardhana
parent 409e09c1e5
commit e99cb05516

View file

@ -176,6 +176,8 @@ func (xl xlObjects) GetObject(bucket, object string, startOffset int64) (io.Read
fileWriter.CloseWithError(err)
return
}
// Reset offset to 0 as it would be non-0 only for the first loop if startOffset is non-0.
offset = 0
if _, err := io.Copy(fileWriter, r); err != nil {
fileWriter.CloseWithError(err)
return