From 27b9ae4fc38d8cd01d072228f4afd28cce44d11b Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 3 Sep 2020 10:25:00 +0100 Subject: [PATCH] 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 --- vfs/vfscache/item.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vfs/vfscache/item.go b/vfs/vfscache/item.go index 2f3749609..1606237ff 100644 --- a/vfs/vfscache/item.go +++ b/vfs/vfscache/item.go @@ -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)