Fossil SCM

Once again attempt to fix "fossil server --repolist" so that it ignores ".fossil" database files.

drh 2015-06-27 21:47 UTC trunk
Commit 63fc62d9ecfa141afbf8aeb5deaf7cbfbca1eb59
1 file changed +2 -2
+2 -2
--- src/main.c
+++ src/main.c
@@ -1457,11 +1457,11 @@
14571457
blob_init(&base, g.zRepositoryName, -1);
14581458
sqlite3_open(":memory:", &g.db);
14591459
db_multi_exec("CREATE TABLE sfile(x TEXT);");
14601460
db_multi_exec("CREATE TABLE vfile(pathname);");
14611461
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'");
14631463
n = db_int(0, "SELECT count(*) FROM sfile");
14641464
if( n>0 ){
14651465
Stmt q;
14661466
@ <html>
14671467
@ <head>
@@ -1552,11 +1552,11 @@
15521552
continue;
15531553
}
15541554
szFile = 1;
15551555
break;
15561556
}
1557
- if( szFile==0 ){
1557
+ if( szFile==0 && sqlite3_strglob("*/.fossil",zRepo)!=0 ){
15581558
if( zRepo[0]=='/' && zRepo[1]=='/' ){ zRepo++; j--; }
15591559
szFile = file_size(zRepo);
15601560
/* this should only be set from the --baseurl option, not CGI */
15611561
if( g.zBaseURL && g.zBaseURL[0]!=0 && g.zTop && g.zTop[0]!=0 &&
15621562
file_isdir(g.zRepositoryName)==1 ){
15631563
--- 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

Keyboard Shortcuts

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