X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/9a8f88658d51aeb86a79ac1121de13562ad2601f..23734c5a2b607dca2d634cafdc63202a687f26d3:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index c4d75ab..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(""); + html(""); html(""); - html("\n"); + html("\n"); read_tree_recursive(tree, "", 0, 1, NULL, print_entry); html("
Name
ModeNameSizeMode
\n"); }