fix tree copy ref to parent tree
This commit is contained in:
parent
563d4b3610
commit
2a1929b97e
@ -93,6 +93,10 @@ func (tree *FileTree) Copy() *FileTree {
|
||||
newTree := NewTree()
|
||||
*newTree = *tree
|
||||
newTree.root = tree.Root().Copy()
|
||||
newTree.Visit(func(node *FileNode) error {
|
||||
node.tree = newTree
|
||||
return nil
|
||||
})
|
||||
|
||||
return newTree
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user