X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/06fe0c2f47eaf467db8ab1443e61dfa1c280f30a..777faf7e509e1de2b795b2a326ff00c9bd799104:/ui-tree.c
diff --git a/ui-tree.c b/ui-tree.c
index 84930cb..1d07e70 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(" | ");
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("| Name | ");
- html("Size | ");
- html("Mode |
\n");
+ html("");
+ html("| Mode | ");
+ html("Name | ");
+ html("Size | ");
+ html("
\n");
read_tree_recursive(tree, "", 0, 1, NULL, print_entry);
html("
\n");
}