Diff options
-rw-r--r--source/cgit.c5
-rw-r--r--source/cgit.h1
2 files changed, 1 insertion, 5 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)
diff --git a/source/cgit.h b/source/cgit.h
index ff6af4a..da202b7 100644
--- a/source/cgit.h
+++ b/source/cgit.h
@@ -191,7 +191,6 @@ struct cgit_config {
const char *root_title;
const char *root_desc;
char *root_readme;
- const char *script_name;
const char *section;
const char *repository_sort;
// Always ends with a slash.