commit f7a5e44b45f868ff3e44b8abdbd9896c1a50ade4
parent 3df539f8394d9564a7f618c4d9f9911a6b4766f8
Author: Matsuda Kenji <info@mtkn.jp>
Date: Fri, 19 Jan 2024 14:49:03 +0900
fix ReadDir no to update file offset
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs_test.go b/fs_test.go
@@ -76,9 +76,8 @@ func (f *testFile) ReadAt(b []byte, off int64) (n int, err error) {
f.fsys.waitc <- struct{}{}
<-f.fsys.waitc
}
- n, err = f.r.ReadAt(b, off)
- f.offset = off + int64(n)
- return n, err
+ // ReadAt shoul not affect nor be affected by the underlying seek offset.
+ return f.r.ReadAt(b, off)
}
func (f *testFile) ReadDir(n int) ([]fs.DirEntry, error) {