aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2021-06-03 08:12:49 +0700
committerShulhan <ms@kilabit.info>2021-06-03 08:12:49 +0700
commit72d3515006e58d842fb76c5f3d49bb5aaff02e65 (patch)
treef1f972952313c1ab354e32f1976dc437eeab81a6 /lib
parent6f6d9d480fc7efc6441c488b849219f24d051aac (diff)
downloadpakakeh.go-72d3515006e58d842fb76c5f3d49bb5aaff02e65.tar.xz
memfs: set the field Parent on Node AddChild
Diffstat (limited to 'lib')
-rw-r--r--lib/memfs/node.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/memfs/node.go b/lib/memfs/node.go
index 04b6df38..95847b79 100644
--- a/lib/memfs/node.go
+++ b/lib/memfs/node.go
@@ -110,6 +110,7 @@ func NewNode(parent *Node, fi os.FileInfo, maxFileSize int64) (node *Node, err e
//
func (leaf *Node) AddChild(child *Node) {
leaf.Childs = append(leaf.Childs, child)
+ child.Parent = leaf
}
//