Fossil SCM
Take extra precaution to not disturb single file server invocations even though they should already be open and not hit this code.
Commit
d2f1df363ed47d5cdfdd6851bf1b5384aaeb5d74
Parent
9b8d2dcb9f9cd1d…
1 file changed
+2
-1
+2
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1523,11 +1523,12 @@ | ||
| 1523 | 1523 | } |
| 1524 | 1524 | if( szFile==0 ){ |
| 1525 | 1525 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 1526 | 1526 | szFile = file_size(zRepo); |
| 1527 | 1527 | /* this should only be set from the --baseurl option, not CGI */ |
| 1528 | - if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 ){ | |
| 1528 | + if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 && | |
| 1529 | + file_isdir(g.zRepositoryName)==1 ){ | |
| 1529 | 1530 | g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo); |
| 1530 | 1531 | g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo); |
| 1531 | 1532 | } |
| 1532 | 1533 | } |
| 1533 | 1534 | if( szFile<0 && i>0 ){ |
| 1534 | 1535 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1523,11 +1523,12 @@ | |
| 1523 | } |
| 1524 | if( szFile==0 ){ |
| 1525 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 1526 | szFile = file_size(zRepo); |
| 1527 | /* this should only be set from the --baseurl option, not CGI */ |
| 1528 | if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 ){ |
| 1529 | g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo); |
| 1530 | g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo); |
| 1531 | } |
| 1532 | } |
| 1533 | if( szFile<0 && i>0 ){ |
| 1534 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1523,11 +1523,12 @@ | |
| 1523 | } |
| 1524 | if( szFile==0 ){ |
| 1525 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 1526 | szFile = file_size(zRepo); |
| 1527 | /* this should only be set from the --baseurl option, not CGI */ |
| 1528 | if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 && |
| 1529 | file_isdir(g.zRepositoryName)==1 ){ |
| 1530 | g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo); |
| 1531 | g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo); |
| 1532 | } |
| 1533 | } |
| 1534 | if( szFile<0 && i>0 ){ |
| 1535 |