-rw-r--r-- | shared.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -109,5 +109,5 @@ struct repoinfo *add_repo(const char *url) ret = &cgit_repolist.repos[cgit_repolist.count-1]; - ret->url = xstrdup(url); + ret->url = trim_end(url, '/'); ret->name = ret->url; ret->path = NULL; @@ -152,5 +152,5 @@ void cgit_global_config_cb(const char *name, const char *value) cgit_module_link = xstrdup(value); else if (!strcmp(name, "virtual-root")) - cgit_virtual_root = xstrdup(value); + cgit_virtual_root = trim_end(value, '/'); else if (!strcmp(name, "nocache")) cgit_nocache = atoi(value); @@ -190,5 +190,5 @@ void cgit_global_config_cb(const char *name, const char *value) cgit_repo->name = xstrdup(value); else if (cgit_repo && !strcmp(name, "repo.path")) - cgit_repo->path = xstrdup(value); + cgit_repo->path = trim_end(value, '/'); else if (cgit_repo && !strcmp(name, "repo.desc")) cgit_repo->desc = xstrdup(value); |