X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/06fe0c2f47eaf467db8ab1443e61dfa1c280f30a..5cd2bf7e7f3f3daf6107cd3a269bad78e342de70:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index 84930cb..ed9f05e 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -23,15 +23,22 @@ static int print_entry(const unsigned char *sha1, const char *base, return 0; } name = xstrdup(pathname); - html(""); + html(""); + html_filemode(mode); + html(""); if (S_ISDIR(mode)) { html("
"); html_txt(name); @@ -39,13 +46,12 @@ static int print_entry(const unsigned char *sha1, const char *base, html("/"); html("
"); htmlf("%li", size); - htmlf("%06o", mode); html("\n"); free(name); return 0; } -void cgit_print_tree(const char *hex) +void cgit_print_tree(const char *hex, char *path) { struct tree *tree; unsigned char sha1[20]; @@ -61,10 +67,13 @@ void cgit_print_tree(const char *hex) } html("

Tree content

\n"); + html_txt(path); html("\n"); - html(""); - html(""); - html("\n"); + html(""); + html(""); + html(""); + html(""); + html("\n"); read_tree_recursive(tree, "", 0, 1, NULL, print_entry); html("
NameSizeMode
ModeNameSize
\n"); }