|
diff --git a/ui-tree.c b/ui-tree.c index 7cae85a..df05ad3 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -70,33 +70,33 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, |
70 | fullpath = fmt("%s%s%s", ctx.qry.path ? ctx.qry.path : "", |
70 | fullpath = fmt("%s%s%s", ctx.qry.path ? ctx.qry.path : "", |
71 | ctx.qry.path ? "/" : "", name); |
71 | ctx.qry.path ? "/" : "", name); |
72 | |
72 | |
73 | type = sha1_object_info(sha1, &size); |
73 | type = sha1_object_info(sha1, &size); |
74 | if (type == OBJ_BAD && !S_ISGITLINK(mode)) { |
74 | if (type == OBJ_BAD && !S_ISGITLINK(mode)) { |
75 | htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>", |
75 | htmlf("<tr><td colspan='3'>Bad object: %s %s</td></tr>", |
76 | name, |
76 | name, |
77 | sha1_to_hex(sha1)); |
77 | sha1_to_hex(sha1)); |
78 | return 0; |
78 | return 0; |
79 | } |
79 | } |
80 | |
80 | |
81 | html("<tr><td class='ls-mode'>"); |
81 | html("<tr><td class='ls-mode'>"); |
82 | html_filemode(mode); |
82 | html_filemode(mode); |
83 | html("</td><td>"); |
83 | html("</td><td>"); |
84 | if (S_ISGITLINK(mode)) { |
84 | if (S_ISGITLINK(mode)) { |
85 | htmlf("<a class='ls-mod' href='"); |
85 | htmlf("<a class='ls-mod' href='"); |
86 | html_attr(fmt(cgit_repo->module_link, |
86 | html_attr(fmt(ctx.repo->module_link, |
87 | name, |
87 | name, |
88 | sha1_to_hex(sha1))); |
88 | sha1_to_hex(sha1))); |
89 | html("'>"); |
89 | html("'>"); |
90 | html_txt(name); |
90 | html_txt(name); |
91 | html("</a>"); |
91 | html("</a>"); |
92 | } else if (S_ISDIR(mode)) { |
92 | } else if (S_ISDIR(mode)) { |
93 | cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, |
93 | cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, |
94 | curr_rev, fullpath); |
94 | curr_rev, fullpath); |
95 | } else { |
95 | } else { |
96 | cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head, |
96 | cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head, |
97 | curr_rev, fullpath); |
97 | curr_rev, fullpath); |
98 | } |
98 | } |
99 | htmlf("</td><td class='ls-size'>%li</td>", size); |
99 | htmlf("</td><td class='ls-size'>%li</td>", size); |
100 | |
100 | |
101 | html("<td>"); |
101 | html("<td>"); |
102 | cgit_log_link("log", NULL, "button", ctx.qry.head, curr_rev, |
102 | cgit_log_link("log", NULL, "button", ctx.qry.head, curr_rev, |
|