Fossil SCM

Issue a not-found error in CGI if using the "directory:" configuration and there is not PATH_INFO. Ticket [c481aa2fdbc67b7]

drh 2014-08-12 19:35 trunk
Commit ac8e9e555d66e3240417286292d948a875689401
1 file changed +1 -1
+1 -1
--- src/main.c
+++ src/main.c
@@ -1417,11 +1417,11 @@
14171417
}
14181418
if( szFile==0 ){
14191419
if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
14201420
szFile = file_size(zRepo);
14211421
}
1422
- if( szFile<0 ){
1422
+ if( szFile<0 && i>0 ){
14231423
const char *zMimetype;
14241424
assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
14251425
zRepo[j] = 0;
14261426
if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
14271427
fossil_free(zToFree);
14281428
--- src/main.c
+++ src/main.c
@@ -1417,11 +1417,11 @@
1417 }
1418 if( szFile==0 ){
1419 if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
1420 szFile = file_size(zRepo);
1421 }
1422 if( szFile<0 ){
1423 const char *zMimetype;
1424 assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
1425 zRepo[j] = 0;
1426 if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
1427 fossil_free(zToFree);
1428
--- src/main.c
+++ src/main.c
@@ -1417,11 +1417,11 @@
1417 }
1418 if( szFile==0 ){
1419 if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
1420 szFile = file_size(zRepo);
1421 }
1422 if( szFile<0 && i>0 ){
1423 const char *zMimetype;
1424 assert( fossil_strcmp(&zRepo[j], ".fossil")==0 );
1425 zRepo[j] = 0;
1426 if( zPathInfo[i]=='/' && file_isdir(zRepo)==1 ){
1427 fossil_free(zToFree);
1428

Keyboard Shortcuts

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