summaryrefslogtreecommitdiff
path: root/src/vytree.ml
diff options
context:
space:
mode:
Diffstat (limited to 'src/vytree.ml')
-rw-r--r--src/vytree.ml6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/vytree.ml b/src/vytree.ml
index 89743fb..ed1a23e 100644
--- a/src/vytree.ml
+++ b/src/vytree.ml
@@ -87,8 +87,10 @@ let delete node path =
do_with_child delete_immediate node path
let update node path data =
- let update_data data' node' dummy =
- {node' with data=data'}
+ let update_data data' node' name =
+ let child = find_or_fail node' name in
+ let child = { child with data=data' } in
+ replace node' child
in do_with_child (update_data data) node path
let rec get node path =