Skip to content

Commit

Permalink
fix: proper tsize encoding in sharded files
Browse files Browse the repository at this point in the history
  • Loading branch information
rvagg committed Aug 25, 2023
1 parent 7db26c0 commit 0721fae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions data/builder/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,11 @@ func fileTreeRecursive(depth int, children []ipld.Link, childLen []uint64, src c
}
pbn := dpbb.Build()

link, _, err := sizedStore(ls, fileLinkProto, pbn)
link, sz, err := sizedStore(ls, fileLinkProto, pbn)
if err != nil {
return nil, 0, err
}
return link, totalSize, nil
return link, totalSize + sz, nil
}

// BuildUnixFSDirectoryEntry creates the link to a file or directory as it appears within a unixfs directory.
Expand Down

0 comments on commit 0721fae

Please sign in to comment.