|
diff --git a/ui-tree.c b/ui-tree.c index c4d75ab..54dcdbe 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -24,5 +24,7 @@ static int print_entry(const unsigned char *sha1, const char *base, |
24 | } |
24 | } |
25 | name = xstrdup(pathname); |
25 | name = xstrdup(pathname); |
26 | html("<tr><td>"); |
26 | html("<tr><td class='filemode'>"); |
| |
27 | html_filemode(mode); |
| |
28 | html("</td><td>"); |
27 | if (S_ISDIR(mode)) { |
29 | if (S_ISDIR(mode)) { |
28 | html("<div class='ls-dir'><a href='"); |
30 | html("<div class='ls-dir'><a href='"); |
@@ -40,5 +42,4 @@ static int print_entry(const unsigned char *sha1, const char *base, |
40 | html("</a></div></td>"); |
42 | html("</a></div></td>"); |
41 | htmlf("<td class='filesize'>%li</td>", size); |
43 | htmlf("<td class='filesize'>%li</td>", size); |
42 | htmlf("<td class='filemode'>%06o</td>", mode); |
| |
43 | html("</tr>\n"); |
44 | html("</tr>\n"); |
44 | free(name); |
45 | free(name); |
@@ -63,7 +64,9 @@ void cgit_print_tree(const char *hex) |
63 | html("<h2>Tree content</h2>\n"); |
64 | html("<h2>Tree content</h2>\n"); |
64 | html("<table class='list'>\n"); |
65 | html("<table class='list'>\n"); |
65 | html("<tr><th class='left'>Name</th>"); |
66 | html("<tr>"); |
| |
67 | html("<th class='left'>Mode</th>"); |
| |
68 | html("<th class='left'>Name</th>"); |
66 | html("<th class='right'>Size</th>"); |
69 | html("<th class='right'>Size</th>"); |
67 | html("<th class='right'>Mode</th></tr>\n"); |
70 | html("</tr>\n"); |
68 | read_tree_recursive(tree, "", 0, 1, NULL, print_entry); |
71 | read_tree_recursive(tree, "", 0, 1, NULL, print_entry); |
69 | html("</table>\n"); |
72 | html("</table>\n"); |
|