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

Commit 06053e4

Browse files
authored
Merge pull request #93 from ipfs/schomatis/fix/dir/compute-size
fix(directory): initialize size when computing it
2 parents 9dd1330 + c3f568f commit 06053e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Diff for: io/directory.go

+1
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ func NewDirectoryFromNode(dserv ipld.DAGService, node ipld.Node) (Directory, err
150150
}
151151

152152
func (d *BasicDirectory) computeEstimatedSize() {
153+
d.estimatedSize = 0
153154
d.ForEachLink(nil, func(l *ipld.Link) error {
154155
d.addToEstimatedSize(l.Name, l.Cid)
155156
return nil

0 commit comments

Comments
 (0)