Skip to content
This repository was archived by the owner on Jun 27, 2023. It is now read-only.

Commit d1f8577

Browse files
committed
fix(io): make resetPosition actually reset everything
Including the offset.
1 parent 47e4181 commit d1f8577

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

io/dagreader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,7 @@ func (dr *dagReader) Seek(offset int64, whence int) (int64, error) {
480480
// in the `SeekStart` case.
481481
func (dr *dagReader) resetPosition() {
482482
dr.currentNodeData = nil
483+
dr.offset = 0
483484

484485
dr.dagWalker = ipld.NewWalker(dr.ctx, ipld.NewNavigableIPLDNode(dr.rootNode, dr.serv))
485486
// TODO: This could be avoided (along with storing the `dr.rootNode` and

0 commit comments

Comments
 (0)