diff options
Diffstat (limited to 'livetree.c')
-rw-r--r-- | livetree.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -500,7 +500,8 @@ struct node *get_node_by_path(struct node *tree, const char *path) p = strchr(path, '/'); for_each_child(tree, child) { - if (p && strneq(path, child->name, p-path)) + if (p && (strlen(child->name) == p-path) && + strneq(path, child->name, p-path)) return get_node_by_path(child, p+1); else if (!p && streq(path, child->name)) return child; |