diff options
Diffstat (limited to 'cmd.c')
-rw-r--r-- | cmd.c | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -47,8 +47,17 @@ static void about_fn(void) | |||
47 | cgit_redirect(redirect, true); | 47 | cgit_redirect(redirect, true); |
48 | free(currenturl); | 48 | free(currenturl); |
49 | free(redirect); | 49 | free(redirect); |
50 | } else | 50 | } else if (ctx.repo->readme.nr) |
51 | cgit_print_repo_readme(ctx.qry.path); | 51 | cgit_print_repo_readme(ctx.qry.path); |
52 | else if (ctx.repo->homepage) | ||
53 | cgit_redirect(ctx.repo->homepage, false); | ||
54 | else { | ||
55 | char *currenturl = cgit_currenturl(); | ||
56 | char *redirect = fmtalloc("%s../", currenturl); | ||
57 | cgit_redirect(redirect, false); | ||
58 | free(currenturl); | ||
59 | free(redirect); | ||
60 | } | ||
52 | } else | 61 | } else |
53 | cgit_print_site_readme(); | 62 | cgit_print_site_readme(); |
54 | } | 63 | } |