Fossil SCM
Once again attempt to fix "fossil server --repolist" so that it ignores ".fossil" database files.
Commit
63fc62d9ecfa141afbf8aeb5deaf7cbfbca1eb59
Parent
6ec714e519afb73…
1 file changed
+2
-2
+2
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1457,11 +1457,11 @@ | ||
| 1457 | 1457 | blob_init(&base, g.zRepositoryName, -1); |
| 1458 | 1458 | sqlite3_open(":memory:", &g.db); |
| 1459 | 1459 | db_multi_exec("CREATE TABLE sfile(x TEXT);"); |
| 1460 | 1460 | db_multi_exec("CREATE TABLE vfile(pathname);"); |
| 1461 | 1461 | vfile_scan(&base, blob_size(&base), 0, 0, 0); |
| 1462 | - db_multi_exec("DELETE FROM sfile WHERE x NOT GLOB '*[^/.].fossil'"); | |
| 1462 | + db_multi_exec("DELETE FROM sfile WHERE x NOT GLOB '*[^/].fossil'"); | |
| 1463 | 1463 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 1464 | 1464 | if( n>0 ){ |
| 1465 | 1465 | Stmt q; |
| 1466 | 1466 | @ <html> |
| 1467 | 1467 | @ <head> |
| @@ -1552,11 +1552,11 @@ | ||
| 1552 | 1552 | continue; |
| 1553 | 1553 | } |
| 1554 | 1554 | szFile = 1; |
| 1555 | 1555 | break; |
| 1556 | 1556 | } |
| 1557 | - if( szFile==0 ){ | |
| 1557 | + if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){ | |
| 1558 | 1558 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 1559 | 1559 | szFile = file_size(zRepo); |
| 1560 | 1560 | /* this should only be set from the --baseurl option, not CGI */ |
| 1561 | 1561 | if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 && |
| 1562 | 1562 | file_isdir(g.zRepositoryName)==1 ){ |
| 1563 | 1563 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1457,11 +1457,11 @@ | |
| 1457 | blob_init(&base, g.zRepositoryName, -1); |
| 1458 | sqlite3_open(":memory:", &g.db); |
| 1459 | db_multi_exec("CREATE TABLE sfile(x TEXT);"); |
| 1460 | db_multi_exec("CREATE TABLE vfile(pathname);"); |
| 1461 | vfile_scan(&base, blob_size(&base), 0, 0, 0); |
| 1462 | db_multi_exec("DELETE FROM sfile WHERE x NOT GLOB '*[^/.].fossil'"); |
| 1463 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 1464 | if( n>0 ){ |
| 1465 | Stmt q; |
| 1466 | @ <html> |
| 1467 | @ <head> |
| @@ -1552,11 +1552,11 @@ | |
| 1552 | continue; |
| 1553 | } |
| 1554 | szFile = 1; |
| 1555 | break; |
| 1556 | } |
| 1557 | if( szFile==0 ){ |
| 1558 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 1559 | szFile = file_size(zRepo); |
| 1560 | /* this should only be set from the --baseurl option, not CGI */ |
| 1561 | if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 && |
| 1562 | file_isdir(g.zRepositoryName)==1 ){ |
| 1563 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1457,11 +1457,11 @@ | |
| 1457 | blob_init(&base, g.zRepositoryName, -1); |
| 1458 | sqlite3_open(":memory:", &g.db); |
| 1459 | db_multi_exec("CREATE TABLE sfile(x TEXT);"); |
| 1460 | db_multi_exec("CREATE TABLE vfile(pathname);"); |
| 1461 | vfile_scan(&base, blob_size(&base), 0, 0, 0); |
| 1462 | db_multi_exec("DELETE FROM sfile WHERE x NOT GLOB '*[^/].fossil'"); |
| 1463 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 1464 | if( n>0 ){ |
| 1465 | Stmt q; |
| 1466 | @ <html> |
| 1467 | @ <head> |
| @@ -1552,11 +1552,11 @@ | |
| 1552 | continue; |
| 1553 | } |
| 1554 | szFile = 1; |
| 1555 | break; |
| 1556 | } |
| 1557 | if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){ |
| 1558 | if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; } |
| 1559 | szFile = file_size(zRepo); |
| 1560 | /* this should only be set from the --baseurl option, not CGI */ |
| 1561 | if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 && |
| 1562 | file_isdir(g.zRepositoryName)==1 ){ |
| 1563 |