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

mod: TestDagSync, seek before reading #58

Merged
merged 1 commit into from
Jan 20, 2019
Merged

Conversation

schomatis
Copy link
Contributor

No description provided.

@ghost ghost assigned schomatis Jan 17, 2019
@ghost ghost added the status/in-progress In progress label Jan 17, 2019
@schomatis schomatis added the kind/bug A bug in existing code (including security flaws) label Jan 17, 2019
@schomatis
Copy link
Contributor Author

Why was this not failing before? In the current implementation seeking to the end of the file (conveniently) leaves us at the beginning.. (hopefully that will be corrected in #12)

go-unixfs/io/pbdagreader.go

Lines 275 to 282 in 88f9765

for i := 0; i < dr.file.NumChildren(); i++ {
if dr.file.BlockSize(i) > uint64(left) {
dr.linkPosition = i
break
} else {
left -= int64(dr.file.BlockSize(i))
}
}

@schomatis schomatis merged commit 63cc1b6 into master Jan 20, 2019
@ghost ghost removed the status/in-progress In progress label Jan 20, 2019
@schomatis schomatis deleted the fix/dagmod/seek-test branch January 20, 2019 15:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug A bug in existing code (including security flaws)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants