Skip to content

Commit

Permalink
wasi: uses io.Seek{Start,Current} in reopen (#1868)
Browse files Browse the repository at this point in the history
Signed-off-by: Takeshi Yoneda <[email protected]>
  • Loading branch information
mathetake authored Dec 13, 2023
1 parent 5d1d15f commit 56d19de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/sysfs/osfile.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (f *osFile) reopen() (errno experimentalsys.Errno) {
}

if !isDir {
offset, err = f.file.Seek(0, 1)
offset, err = f.file.Seek(0, io.SeekCurrent)
if err != nil {
return experimentalsys.UnwrapOSError(err)
}
Expand All @@ -123,7 +123,7 @@ func (f *osFile) reopen() (errno experimentalsys.Errno) {
}

if !isDir {
_, err = f.file.Seek(offset, 0)
_, err = f.file.Seek(offset, io.SeekStart)
if err != nil {
return experimentalsys.UnwrapOSError(err)
}
Expand Down

0 comments on commit 56d19de

Please sign in to comment.