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

Commit

Permalink
Merge pull request #93 from ipfs/schomatis/fix/dir/compute-size
Browse files Browse the repository at this point in the history
fix(directory): initialize size when computing it
  • Loading branch information
aschmahmann committed May 21, 2021
2 parents 9dd1330 + c3f568f commit 06053e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions io/directory.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func NewDirectoryFromNode(dserv ipld.DAGService, node ipld.Node) (Directory, err
}

func (d *BasicDirectory) computeEstimatedSize() {
d.estimatedSize = 0
d.ForEachLink(nil, func(l *ipld.Link) error {
d.addToEstimatedSize(l.Name, l.Cid)
return nil
Expand Down

0 comments on commit 06053e4

Please sign in to comment.