XL/GetObject: If the offset does not fall in the first "dataBlock" it gives incorrect data. (#1583)

Fixes #1582
master
Krishna Srinivas 9 years ago committed by Harshavardhana
parent e99cb05516
commit b044336329
  1. 1
      xl-erasure-v1-readfile.go

@ -179,6 +179,7 @@ func (xl XL) ReadFile(volume, path string, startOffset int64) (io.ReadCloser, er
startOffset = startOffset - int64(len(dataBlocks))
// Start offset is greater than or equal to zero, skip the dataBlocks.
if startOffset >= 0 {
totalLeft = totalLeft - metadata.Erasure.BlockSize
continue
}
// Now get back the remaining offset if startOffset is negative.

Loading…
Cancel
Save