file read report EOF

fix https://github.com/chrislusf/seaweedfs/issues/1344
This commit is contained in:
Chris Lu 2020-10-14 12:18:24 -07:00
parent 1069b325dd
commit 93bcf56514

View file

@ -156,7 +156,7 @@ func (c *ChunkReadAt) doReadAt(p []byte, offset int64) (n int, err error) {
n += delta
}
if err == nil && offset+int64(len(p)) > c.fileSize {
if err == nil && offset+int64(len(p)) >= c.fileSize {
err = io.EOF
}
// fmt.Printf("~~~ filled %d, err: %v\n\n", n, err)