summaryrefslogtreecommitdiffabout
path: root/ui-tree.c
Unidiff
Diffstat (limited to 'ui-tree.c') (more/less context) (ignore whitespace changes)
-rw-r--r--ui-tree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui-tree.c b/ui-tree.c
index f53ab64..a164767 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -267,19 +267,19 @@ void cgit_print_tree(const char *rev, char *path)
267 commit = lookup_commit_reference(sha1); 267 commit = lookup_commit_reference(sha1);
268 if (!commit || parse_commit(commit)) { 268 if (!commit || parse_commit(commit)) {
269 cgit_print_error(fmt("Invalid commit reference: %s", rev)); 269 cgit_print_error(fmt("Invalid commit reference: %s", rev));
270 return; 270 return;
271 } 271 }
272 272
273 html("path: <a href='"); 273 html("path: <a href='");
274 html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev))); 274 html_attr(cgit_pageurl(ctx.qry.repo, "tree", fmt("h=%s", rev)));
275 html("'>root</a>"); 275 html("'>root</a>");
276 276
277 if (path == NULL) { 277 if (path == NULL) {
278 ls_tree(commit->tree->object.sha1, NULL); 278 ls_tree(commit->tree->object.sha1, NULL);
279 return; 279 return;
280 } 280 }
281 281
282 match_path = path; 282 match_path = path;
283 read_tree_recursive(commit->tree, NULL, 0, 0, paths, walk_tree, NULL); 283 read_tree_recursive(commit->tree, "", 0, 0, paths, walk_tree, NULL);
284 ls_tail(); 284 ls_tail();
285} 285}