Skip to contentSkip to conversation

when reading / read automatically the root node.

PATCH New Vincent Hanquez 1 participant 1 message Sep 10, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 when reading / read automatically the root node.

---
 tools/ocaml/xenstored/store.ml |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
tools/ocaml/xenstored/store.ml +6 -1
index 34552bb..4c9b166 100644
@@ -300,7 +300,12 @@ let read store perm path =
 		Node.check_perm ent perm Perms.READ;
 		ent.Node.value
 	in
-	Path.apply store.root path do_read
+	if path = [] then (
+		let ent = store.root in
+		Node.check_perm ent perm Perms.READ;
+		ent.Node.value
+	) else
+		Path.apply store.root path do_read
 
 let ls store perm path =
 	let children =
Signature · 1 line
1.7.1