From 84f9c83b7ebc472585fda69371c8c6050c74ec8c Mon Sep 17 00:00:00 2001 From: Yerden Zhumabekov Date: Wed, 2 Sep 2020 10:25:49 +0600 Subject: [PATCH] mem: fix Write setting wrong offset Signed-off-by: Yerden Zhumabekov --- mem/file.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mem/file.go b/mem/file.go index ae667e8..07b2e12 100644 --- a/mem/file.go +++ b/mem/file.go @@ -260,7 +260,7 @@ func (f *File) Write(b []byte) (n int, err error) { } setModTime(f.fileData, time.Now()) - atomic.StoreInt64(&f.at, int64(len(f.fileData.data))) + atomic.AddInt64(&f.at, int64(n)) return }