2
0
mirror of https://git.zx2c4.com/cgit synced 2025-08-30 22:05:08 +00:00

Merge branch 'stable'

This commit is contained in:
Lars Hjemli
2011-05-23 23:26:10 +02:00
9 changed files with 61 additions and 29 deletions

5
cgit.c
View File

@@ -767,8 +767,11 @@ int main(int argc, const char **argv)
* that virtual-root equals SCRIPT_NAME, minus any possibly
* trailing slashes.
*/
if (!ctx.cfg.virtual_root)
if (!ctx.cfg.virtual_root && ctx.cfg.script_name) {
ctx.cfg.virtual_root = trim_end(ctx.cfg.script_name, '/');
if (!ctx.cfg.virtual_root)
ctx.cfg.virtual_root = "";
}
/* If no url parameter is specified on the querystring, lets
* use PATH_INFO as url. This allows cgit to work with virtual