mirror of
https://github.com/minio/minio.git
synced 2025-01-23 12:43:16 -05:00
XL/GetObject: If the offset does not fall in the first "dataBlock" it gives incorrect data. (#1583)
Fixes #1582
This commit is contained in:
parent
e99cb05516
commit
b044336329
@ -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…
x
Reference in New Issue
Block a user