summaryrefslogtreecommitdiff
path: root/cgit.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgit.c')
-rw-r--r--cgit.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cgit.c b/cgit.c
index e302a7c..e498030 100644
--- a/cgit.c
+++ b/cgit.c
@@ -757,8 +757,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
>2010-04-14Improve the C modulesRené 'Necoro' Neumann3-37/+52 2010-04-14Small modifications made to the French translation (typos, grammar).Clement Bourgeois1-69/+69 2010-04-14Fixed the unicode support and stuff ... and also made eix faster :)René 'Necoro' Neumann1-20/+22 2010-04-14Disable debug messages by defaultRené 'Necoro' Neumann1-1/+1 2010-04-13Better eix error inheritance and handlingRené 'Necoro' Neumann1-2/+9 2010-04-13Fix the handling of FilterSets. Fixes bug #558887.René 'Necoro' Neumann2-56/+64 2010-04-12Updated newsRené 'Necoro' Neumann1-0/+1 2010-04-13Added my name to translators list.Clement Bourgeois1-0/+1