Fossil SCM
Fix the code in db_open_config() that checks the current 'attachment mode' for the configuration database against the requested one.
Commit
569f4b0e04fb8ff63412d05d8d17a8f6a1fc34d8
Parent
5a14b7834680e61…
1 file changed
+1
-1
M
src/db.c
+1
-1
| --- src/db.c | ||
| +++ src/db.c | ||
| @@ -1050,11 +1050,11 @@ | ||
| 1050 | 1050 | */ |
| 1051 | 1051 | int db_open_config(int useAttach, int isOptional){ |
| 1052 | 1052 | char *zDbName; |
| 1053 | 1053 | char *zHome; |
| 1054 | 1054 | if( g.zConfigDbName ){ |
| 1055 | - int alreadyAttached = db_database_slot("configdb")>=0; | |
| 1055 | + int alreadyAttached = db_database_slot("configdb")>0; | |
| 1056 | 1056 | if( useAttach==alreadyAttached ) return 1; /* Already open. */ |
| 1057 | 1057 | db_close_config(); |
| 1058 | 1058 | } |
| 1059 | 1059 | zHome = fossil_getenv("FOSSIL_HOME"); |
| 1060 | 1060 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 1061 | 1061 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1050,11 +1050,11 @@ | |
| 1050 | */ |
| 1051 | int db_open_config(int useAttach, int isOptional){ |
| 1052 | char *zDbName; |
| 1053 | char *zHome; |
| 1054 | if( g.zConfigDbName ){ |
| 1055 | int alreadyAttached = db_database_slot("configdb")>=0; |
| 1056 | if( useAttach==alreadyAttached ) return 1; /* Already open. */ |
| 1057 | db_close_config(); |
| 1058 | } |
| 1059 | zHome = fossil_getenv("FOSSIL_HOME"); |
| 1060 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 1061 |
| --- src/db.c | |
| +++ src/db.c | |
| @@ -1050,11 +1050,11 @@ | |
| 1050 | */ |
| 1051 | int db_open_config(int useAttach, int isOptional){ |
| 1052 | char *zDbName; |
| 1053 | char *zHome; |
| 1054 | if( g.zConfigDbName ){ |
| 1055 | int alreadyAttached = db_database_slot("configdb")>0; |
| 1056 | if( useAttach==alreadyAttached ) return 1; /* Already open. */ |
| 1057 | db_close_config(); |
| 1058 | } |
| 1059 | zHome = fossil_getenv("FOSSIL_HOME"); |
| 1060 | #if defined(_WIN32) || defined(__CYGWIN__) |
| 1061 |