forked from mirror/afero
mem: fix Write setting wrong offset
Signed-off-by: Yerden Zhumabekov <yerden.zhumabekov@gmail.com>
This commit is contained in:
parent
d2521ec52d
commit
84f9c83b7e
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue