]> git.cameronkatri.com Git - cgit.git/blobdiff - cgit.c
Merge branch 'stable'
[cgit.git] / cgit.c
diff --git a/cgit.c b/cgit.c
index bd377881f669d44634767489dfb276dce3308426..bfde9f98ccfdf1c793aa1d70e1558e90a4b5ace5 100644 (file)
--- a/cgit.c
+++ b/cgit.c
@@ -68,9 +68,9 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
                repo->section = xstrdup(value);
        else if (!strcmp(name, "readme") && value != NULL) {
                if (*value == '/')
-                       ctx.repo->readme = xstrdup(value);
+                       repo->readme = xstrdup(value);
                else
-                       ctx.repo->readme = xstrdup(fmt("%s/%s", ctx.repo->path, value));
+                       repo->readme = xstrdup(fmt("%s/%s", repo->path, value));
        } else if (ctx.cfg.enable_filter_overrides) {
                if (!strcmp(name, "about-filter"))
                        repo->about_filter = new_filter(value, 0);
@@ -209,6 +209,8 @@ static void querystring_cb(const char *name, const char *value)
        } else if (!strcmp(name, "p")) {
                ctx.qry.page = xstrdup(value);
        } else if (!strcmp(name, "url")) {
+               if (*value == '/')
+                       value++;
                ctx.qry.url = xstrdup(value);
                cgit_parse_url(value);
        } else if (!strcmp(name, "qt")) {