mem: fix Write setting wrong offset

Signed-off-by: Yerden Zhumabekov <yerden.zhumabekov@gmail.com>
This commit is contained in:
Yerden Zhumabekov 2020-09-02 10:25:49 +06:00
parent d2521ec52d
commit 84f9c83b7e
1 changed files with 1 additions and 1 deletions

View File

@ -260,7 +260,7 @@ func (f *File) Write(b []byte) (n int, err error) {
} }
setModTime(f.fileData, time.Now()) setModTime(f.fileData, time.Now())
atomic.StoreInt64(&f.at, int64(len(f.fileData.data))) atomic.AddInt64(&f.at, int64(n))
return return
} }