From 93bcf565149dd2e77b20380b584049b5dc6c6e00 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Wed, 14 Oct 2020 12:18:24 -0700 Subject: [PATCH] file read report EOF fix https://github.com/chrislusf/seaweedfs/issues/1344 --- weed/filer/reader_at.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/weed/filer/reader_at.go b/weed/filer/reader_at.go index da7eae621..f73f72429 100644 --- a/weed/filer/reader_at.go +++ b/weed/filer/reader_at.go @@ -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)