Unidiff1 files changed, 7 insertions, 1 deletions
|
diff --git a/ui-tree.c b/ui-tree.c index caf6a9e..c608754 100644 --- a/ ui-tree.c+++ b/ ui-tree.c |
|
@@ -113,6 +113,7 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, |
113 | { |
113 | { |
114 | char *name; |
114 | char *name; |
115 | char *fullpath; |
115 | char *fullpath; |
| |
116 | char *class; |
116 | enum object_type type; |
117 | enum object_type type; |
117 | unsigned long size = 0; |
118 | unsigned long size = 0; |
118 | |
119 | |
@@ -145,7 +146,12 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, |
145 | cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, |
146 | cgit_tree_link(name, NULL, "ls-dir", ctx.qry.head, |
146 | curr_rev, fullpath); |
147 | curr_rev, fullpath); |
147 | } else { |
148 | } else { |
148 | cgit_tree_link(name, NULL, "ls-blob", ctx.qry.head, |
149 | class = strrchr(name, '.'); |
| |
150 | if (class != NULL) { |
| |
151 | class = fmt("ls-blob %s", class + 1); |
| |
152 | } else |
| |
153 | class = "ls-blob"; |
| |
154 | cgit_tree_link(name, NULL, class, ctx.qry.head, |
149 | curr_rev, fullpath); |
155 | curr_rev, fullpath); |
150 | } |
156 | } |
151 | htmlf("</td><td class='ls-size'>%li</td>", size); |
157 | htmlf("</td><td class='ls-size'>%li</td>", size); |
|