vfs: fix spurious error "vfs cache: failed to _ensure cache EOF"

Before this change the error message was produced for every file which
was confusing users.

After this change we check for EOF and return from ReadAt at that
point.

See: https://forum.rclone.org/t/rclone-1-53-release/18880/10
This commit is contained in:
Nick Craig-Wood 2020-09-03 10:25:00 +01:00
parent 7e2488af10
commit 27b9ae4fc3
1 changed files with 1 additions and 1 deletions

View File

@ -1158,7 +1158,7 @@ func (item *Item) ReadAt(b []byte, off int64) (n int, err error) {
item.preAccess()
n, err = item.readAt(b, off)
item.postAccess()
if err == nil {
if err == nil || err == io.EOF {
break
}
fs.Errorf(item.name, "vfs cache: failed to _ensure cache %v", err)