Fossil SCM

When walking the filesystem in order to construct a repository list, avoid walking into any directory name "proc". See [forum:/forumpost/d9553c52fc|forum thread d9553c52fc] for rationale.

drh 2025-06-17 16:42 trunk
Commit a8c96a64c4ddebc43f0a25c50ab8d3c14d5c2f491028464c35d9e1626372256d
1 file changed +4 -1
+4 -1
--- src/repolist.c
+++ src/repolist.c
@@ -157,17 +157,20 @@
157157
allRepo = 1;
158158
}else{
159159
/* The default case: All repositories under the g.zRepositoryName
160160
** directory.
161161
*/
162
+ Glob *pExclude;
162163
blob_init(&base, g.zRepositoryName, -1);
163164
db_close(0);
164165
assert( g.db==0 );
165166
sqlite3_open(":memory:", &g.db);
166167
db_multi_exec("CREATE TABLE sfile(pathname TEXT);");
167168
db_multi_exec("CREATE TABLE vfile(pathname);");
168
- vfile_scan(&base, blob_size(&base), 0, 0, 0, ExtFILE);
169
+ pExclude = glob_create("*/proc,proc");
170
+ vfile_scan(&base, blob_size(&base), 0, pExclude, 0, ExtFILE);
171
+ glob_free(pExclude);
169172
db_multi_exec("DELETE FROM sfile WHERE pathname NOT GLOB '*[^/].fossil'"
170173
#if USE_SEE
171174
" AND pathname NOT GLOB '*[^/].efossil'"
172175
#endif
173176
);
174177
--- src/repolist.c
+++ src/repolist.c
@@ -157,17 +157,20 @@
157 allRepo = 1;
158 }else{
159 /* The default case: All repositories under the g.zRepositoryName
160 ** directory.
161 */
 
162 blob_init(&base, g.zRepositoryName, -1);
163 db_close(0);
164 assert( g.db==0 );
165 sqlite3_open(":memory:", &g.db);
166 db_multi_exec("CREATE TABLE sfile(pathname TEXT);");
167 db_multi_exec("CREATE TABLE vfile(pathname);");
168 vfile_scan(&base, blob_size(&base), 0, 0, 0, ExtFILE);
 
 
169 db_multi_exec("DELETE FROM sfile WHERE pathname NOT GLOB '*[^/].fossil'"
170 #if USE_SEE
171 " AND pathname NOT GLOB '*[^/].efossil'"
172 #endif
173 );
174
--- src/repolist.c
+++ src/repolist.c
@@ -157,17 +157,20 @@
157 allRepo = 1;
158 }else{
159 /* The default case: All repositories under the g.zRepositoryName
160 ** directory.
161 */
162 Glob *pExclude;
163 blob_init(&base, g.zRepositoryName, -1);
164 db_close(0);
165 assert( g.db==0 );
166 sqlite3_open(":memory:", &g.db);
167 db_multi_exec("CREATE TABLE sfile(pathname TEXT);");
168 db_multi_exec("CREATE TABLE vfile(pathname);");
169 pExclude = glob_create("*/proc,proc");
170 vfile_scan(&base, blob_size(&base), 0, pExclude, 0, ExtFILE);
171 glob_free(pExclude);
172 db_multi_exec("DELETE FROM sfile WHERE pathname NOT GLOB '*[^/].fossil'"
173 #if USE_SEE
174 " AND pathname NOT GLOB '*[^/].efossil'"
175 #endif
176 );
177

Keyboard Shortcuts

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