X-Git-Url: https://gitweb.ps.run/ps-cgit/blobdiff_plain/a4d1ca1dc6ff8171694d9e2280b6075a1beced0c..502865a5ec40fed5f1f865cb34002aecaab8405e:/ui-tree.c
diff --git a/ui-tree.c b/ui-tree.c
index 9be3140..5a2dd3f 100644
--- a/ui-tree.c
+++ b/ui-tree.c
@@ -36,7 +36,8 @@ static void print_object(const unsigned char *sha1, char *path)
}
html(" blob: %s",sha1_to_hex(sha1));
html("
\n");
@@ -72,12 +73,14 @@ 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("| Bad object: %s %s |
",
- name,
- sha1_to_hex(sha1));
- return 0;
+ if (!S_ISGITLINK(mode)) {
+ type = sha1_object_info(sha1, &size);
+ if (type == OBJ_BAD) {
+ htmlf("| Bad object: %s %s |
",
+ name,
+ sha1_to_hex(sha1));
+ return 0;
+ }
}
html("| ");
|