Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
Keep the script name local to prepare_context
Diffstat (limited to 'source/cgit.c')
| -rw-r--r-- | source/cgit.c | 5 |
1 file changed, 1 insertion, 4 deletions
diff --git a/source/cgit.c b/source/cgit.c index 3ae895d..bccc58f 100644 --- a/source/cgit.c +++ b/source/cgit.c @@ -136,7 +136,6 @@ static void prepare_context(void) ctx.cfg.robots = "index, nofollow"; ctx.cfg.root_title = "Git repository browser"; ctx.cfg.root_desc = "a fast webinterface for the git dscm"; - ctx.cfg.script_name = CGIT_SCRIPT_NAME; ctx.cfg.section = ""; ctx.cfg.repository_sort = "name"; ctx.cfg.summary_branches = 10; @@ -159,9 +158,7 @@ static void prepare_context(void) ctx.page.mimetype = "text/html"; ctx.page.charset = PAGE_ENCODING; string_list_init_dup(&ctx.cfg.mimetypes); - if (script_name) - ctx.cfg.script_name = xstrdup(script_name); - ctx.cfg.virtual_root = ensure_end(ctx.cfg.script_name, '/'); + ctx.cfg.virtual_root = ensure_end(script_name ? script_name : CGIT_SCRIPT_NAME, '/'); if (ctx.env.query_string) ctx.qry.raw = xstrdup(ctx.env.query_string); if (!ctx.env.cgit_config) |
