Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Handle appendvfs initialization a little differently, in a way that works on windows. |
|---|---|
| Downloads: | Tarball | ZIP archive |
| Timelines: | family | ancestors | descendants | both | use-appendvfs |
| Files: | files | file ages | folders |
| SHA3-256: |
51c1276ee77755650e3b2c25655d4b98 |
| User & Date: | drh 2018-05-14 01:06:00.736 |
Context
|
2018-05-18
| ||
| 18:24 | If launched with no command-line arguments, check for a repo appended to the end of the executable and open "ui" on that repo. check-in: 37b2eb9991 user: drh tags: trunk | |
|
2018-05-14
| ||
| 01:06 | Handle appendvfs initialization a little differently, in a way that works on windows. Closed-Leaf check-in: 51c1276ee7 user: drh tags: use-appendvfs | |
| 00:55 | If the fossil binary is launched with no command-line arguments, check to see if there is an appended repository and if there is, run "ui" against that repository. check-in: 517fe07621 user: drh tags: use-appendvfs | |
Changes
Changes to src/db.c.
| ︙ | ︙ | |||
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 |
** connection. An error results in process abort.
*/
LOCAL sqlite3 *db_open(const char *zDbName){
int rc;
sqlite3 *db;
if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
rc = sqlite3_open_v2(
zDbName, &db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
g.zVfsName
);
if( rc!=SQLITE_OK ){
db_err("[%s]: %s", zDbName, sqlite3_errmsg(db));
| > > > > | 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 |
** connection. An error results in process abort.
*/
LOCAL sqlite3 *db_open(const char *zDbName){
int rc;
sqlite3 *db;
if( g.fSqlTrace ) fossil_trace("-- sqlite3_open: [%s]\n", zDbName);
if( strcmp(zDbName, g.nameOfExe)==0 ){
sqlite3_appendvfs_init(0,0,0);
g.zVfsName = "apndvfs";
}
rc = sqlite3_open_v2(
zDbName, &db,
SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE,
g.zVfsName
);
if( rc!=SQLITE_OK ){
db_err("[%s]: %s", zDbName, sqlite3_errmsg(db));
|
| ︙ | ︙ |
Changes to src/main.c.
| ︙ | ︙ | |||
542 543 544 545 546 547 548 |
** file using the appendvfs extension. If so, change command-line arguments
** to cause Fossil to launch with "fossil ui" on that repo.
*/
static int fossilExeHasAppendedRepo(void){
extern int deduceDatabaseType(const char*,int);
if( 2==deduceDatabaseType(g.nameOfExe,0) ){
static char *azAltArgv[] = { 0, "ui", 0, 0 };
| < < | 542 543 544 545 546 547 548 549 550 551 552 553 554 555 |
** file using the appendvfs extension. If so, change command-line arguments
** to cause Fossil to launch with "fossil ui" on that repo.
*/
static int fossilExeHasAppendedRepo(void){
extern int deduceDatabaseType(const char*,int);
if( 2==deduceDatabaseType(g.nameOfExe,0) ){
static char *azAltArgv[] = { 0, "ui", 0, 0 };
azAltArgv[0] = g.nameOfExe;
azAltArgv[2] = g.nameOfExe;
g.argv = azAltArgv;
g.argc = 3;
return 1;
}else{
return 0;
|
| ︙ | ︙ |