Skip to content

Commit 0721fae

Browse files
committed
fix: proper tsize encoding in sharded files
1 parent 7db26c0 commit 0721fae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

data/builder/file.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,11 +166,11 @@ func fileTreeRecursive(depth int, children []ipld.Link, childLen []uint64, src c
166166
}
167167
pbn := dpbb.Build()
168168

169-
link, _, err := sizedStore(ls, fileLinkProto, pbn)
169+
link, sz, err := sizedStore(ls, fileLinkProto, pbn)
170170
if err != nil {
171171
return nil, 0, err
172172
}
173-
return link, totalSize, nil
173+
return link, totalSize + sz, nil
174174
}
175175

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

0 commit comments

Comments
 (0)