-rw-r--r-- | ui-shared.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/ui-shared.c b/ui-shared.c index b0cff7d..6211056 100644 --- a/ui-shared.c +++ b/ui-shared.c | |||
@@ -61,8 +61,12 @@ char *cgit_pageurl(const char *reponame, const char *pagename, | |||
61 | const char *query) | 61 | const char *query) |
62 | { | 62 | { |
63 | if (cgit_virtual_root) { | 63 | if (cgit_virtual_root) { |
64 | if (query) | ||
64 | return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame, | 65 | return fmt("%s/%s/%s/?%s", cgit_virtual_root, reponame, |
65 | pagename, query); | 66 | pagename, query); |
67 | else | ||
68 | return fmt("%s/%s/%s/", cgit_virtual_root, reponame, | ||
69 | pagename); | ||
66 | } else { | 70 | } else { |
67 | return fmt("?r=%s&p=%s&%s", reponame, pagename, query); | 71 | return fmt("?r=%s&p=%s&%s", reponame, pagename, query); |
68 | } | 72 | } |