Skip to content

Commit

Permalink
mem: fix Write setting wrong offset
Browse files Browse the repository at this point in the history
Signed-off-by: Yerden Zhumabekov <[email protected]>
  • Loading branch information
yerden committed Sep 2, 2020
1 parent d2521ec commit 84f9c83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mem/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 84f9c83

Please sign in to comment.