X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/d14d77fe95c3b6224b40df9b101dded0deea913c..29b37e9781ce1bb04e558c7490d2c29eb1a477e5:/ui-tree.c diff --git a/ui-tree.c b/ui-tree.c index 7cae85a..5a2dd3f 100644 --- a/ui-tree.c +++ b/ui-tree.c @@ -7,6 +7,8 @@ */ #include "cgit.h" +#include "html.h" +#include "ui-shared.h" char *curr_rev; char *match_path; @@ -34,7 +36,8 @@ static void print_object(const unsigned char *sha1, char *path) } html(" blob: %s",sha1_to_hex(sha1)); html("\n"); @@ -70,20 +73,22 @@ static int ls_item(const unsigned char *sha1, const char *base, int baselen, fullpath = fmt("%s%s%s", ctx.qry.path ? ctx.qry.path : "", ctx.qry.path ? "/" : "", name); - type = sha1_object_info(sha1, &size); - if (type == OBJ_BAD && !S_ISGITLINK(mode)) { - htmlf("", - name, - sha1_to_hex(sha1)); - return 0; + if (!S_ISGITLINK(mode)) { + type = sha1_object_info(sha1, &size); + if (type == OBJ_BAD) { + htmlf("", + name, + sha1_to_hex(sha1)); + return 0; + } } html("
Bad object: %s %s
Bad object: %s %s
"); - html_filemode(mode); + cgit_print_filemode(mode); html(""); if (S_ISGITLINK(mode)) { htmlf("");