diff options
Diffstat (limited to 'ui-tree.c')
-rw-r--r-- | ui-tree.c | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -107,6 +107,12 @@ static void print_object(const unsigned char *sha1, char *path, const char *base | |||
107 | curr_rev, path); | 107 | curr_rev, path); |
108 | htmlf(")<br/>blob: %s\n", sha1_to_hex(sha1)); | 108 | htmlf(")<br/>blob: %s\n", sha1_to_hex(sha1)); |
109 | 109 | ||
110 | if (ctx.cfg.max_blob_size && size / 1024 > ctx.cfg.max_blob_size) { | ||
111 | htmlf("<div class='error'>blob size (%dKB) exceeds display size limit (%dKB).</div>", | ||
112 | size / 1024, ctx.cfg.max_blob_size); | ||
113 | return; | ||
114 | } | ||
115 | |||
110 | if (buffer_is_binary(buf, size)) | 116 | if (buffer_is_binary(buf, size)) |
111 | print_binary_buffer(buf, size); | 117 | print_binary_buffer(buf, size); |
112 | else | 118 | else |
@@ -169,6 +175,8 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, | |||
169 | if (ctx.repo->max_stats) | 175 | if (ctx.repo->max_stats) |
170 | cgit_stats_link("stats", NULL, "button", ctx.qry.head, | 176 | cgit_stats_link("stats", NULL, "button", ctx.qry.head, |
171 | fullpath); | 177 | fullpath); |
178 | cgit_plain_link("plain", NULL, "button", ctx.qry.head, curr_rev, | ||
179 | fullpath); | ||
172 | html("</td></tr>\n"); | 180 | html("</td></tr>\n"); |
173 | free(name); | 181 | free(name); |
174 | return 0; | 182 | return 0; |