Fossil SCM

Fix incorrect detection of fossil.exe with an appended database. [forum:/info/2026-09-27T08:05:34Z|Forum 2026-09-27T08:05:34Z].

drh 2026-09-27 18:41 UTC trunk
Commit 76742655f00daf858779bc7778dba167f7593791837193f555ea66c9767670cd
1 file changed +10 -2
+10 -2
--- src/main.c
+++ src/main.c
@@ -692,12 +692,20 @@
692692
** Check to see if the Fossil binary contains an appended repository
693693
** file using the appendvfs extension. If so, change command-line arguments
694694
** to cause Fossil to launch with "fossil ui" on that repo.
695695
*/
696696
static int fossilExeHasAppendedRepo(void){
697
- extern int deduceDatabaseType(const char*,int);
698
- if( 2==deduceDatabaseType(g.nameOfExe,0) ){
697
+ int rc;
698
+ /* Warning: dedeuceDatabaseType is an internal function of the SQLite
699
+ ** CLI and is subject to change. Verify the following function template
700
+ ** when updating to a newer SQLite */
701
+ extern int deduceDatabaseType(const char*,int,int);
702
+
703
+ g.dbIgnoreErrors++;
704
+ rc = deduceDatabaseType(g.nameOfExe,0,SQLITE_OPEN_READWRITE);
705
+ g.dbIgnoreErrors--;
706
+ if( rc ){
699707
static char *azAltArgv[] = { 0, "ui", 0, 0 };
700708
azAltArgv[0] = g.nameOfExe;
701709
azAltArgv[2] = g.nameOfExe;
702710
g.argv = azAltArgv;
703711
g.argc = 3;
704712
--- src/main.c
+++ src/main.c
@@ -692,12 +692,20 @@
692 ** Check to see if the Fossil binary contains an appended repository
693 ** file using the appendvfs extension. If so, change command-line arguments
694 ** to cause Fossil to launch with "fossil ui" on that repo.
695 */
696 static int fossilExeHasAppendedRepo(void){
697 extern int deduceDatabaseType(const char*,int);
698 if( 2==deduceDatabaseType(g.nameOfExe,0) ){
 
 
 
 
 
 
 
 
699 static char *azAltArgv[] = { 0, "ui", 0, 0 };
700 azAltArgv[0] = g.nameOfExe;
701 azAltArgv[2] = g.nameOfExe;
702 g.argv = azAltArgv;
703 g.argc = 3;
704
--- src/main.c
+++ src/main.c
@@ -692,12 +692,20 @@
692 ** Check to see if the Fossil binary contains an appended repository
693 ** file using the appendvfs extension. If so, change command-line arguments
694 ** to cause Fossil to launch with "fossil ui" on that repo.
695 */
696 static int fossilExeHasAppendedRepo(void){
697 int rc;
698 /* Warning: dedeuceDatabaseType is an internal function of the SQLite
699 ** CLI and is subject to change. Verify the following function template
700 ** when updating to a newer SQLite */
701 extern int deduceDatabaseType(const char*,int,int);
702
703 g.dbIgnoreErrors++;
704 rc = deduceDatabaseType(g.nameOfExe,0,SQLITE_OPEN_READWRITE);
705 g.dbIgnoreErrors--;
706 if( rc ){
707 static char *azAltArgv[] = { 0, "ui", 0, 0 };
708 azAltArgv[0] = g.nameOfExe;
709 azAltArgv[2] = g.nameOfExe;
710 g.argv = azAltArgv;
711 g.argc = 3;
712

Keyboard Shortcuts

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