Fossil SCM

Take extra precaution to not disturb single file server invocations even though they should already be open and not hit this code.

andybradford 2015-04-03 02:05 trunk
Commit d2f1df363ed47d5cdfdd6851bf1b5384aaeb5d74
1 file changed +2 -1
+2 -1
--- src/main.c
+++ src/main.c
@@ -1523,11 +1523,12 @@
15231523
}
15241524
if( szFile==0 ){
15251525
if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
15261526
szFile = file_size(zRepo);
15271527
/* 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 ){
15291530
g.zBaseURL = mprintf("%s%.*s", g.zBaseURL, i, zPathInfo);
15301531
g.zTop = mprintf("%s%.*s", g.zTop, i, zPathInfo);
15311532
}
15321533
}
15331534
if( szFile<0 && i>0 ){
15341535
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button