aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Frank <mail@dmitryfrank.com>2017-11-10 19:51:34 +0200
committerDmitry Frank <mail@dmitryfrank.com>2017-11-10 19:51:34 +0200
commitde4769c8ee1fd80478deca1bd66b29b1f8c28526 (patch)
treebcadb2aff39d1160de79f7778eee5d28a297bdf7
parente2791ac8605432dbdc5085fc165ace2c9e487f23 (diff)
downloadgo-git-de4769c8ee1fd80478deca1bd66b29b1f8c28526.tar.gz
Fix support for dir symlinks
-rw-r--r--utils/merkletrie/filesystem/node.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/utils/merkletrie/filesystem/node.go b/utils/merkletrie/filesystem/node.go
index f763e08..42a58a3 100644
--- a/utils/merkletrie/filesystem/node.go
+++ b/utils/merkletrie/filesystem/node.go
@@ -77,6 +77,10 @@ func (n *node) NumChildren() (int, error) {
}
func (n *node) calculateChildren() error {
+ if !n.IsDir() {
+ return nil
+ }
+
if len(n.children) != 0 {
return nil
}