Fossil SCM

Fix the code in db_open_config() that checks the current 'attachment mode' for the configuration database against the requested one.

mistachkin 2016-08-21 02:17 UTC omit-db_name
Commit 569f4b0e04fb8ff63412d05d8d17a8f6a1fc34d8
1 file changed +1 -1
+1 -1
--- src/db.c
+++ src/db.c
@@ -1050,11 +1050,11 @@
10501050
*/
10511051
int db_open_config(int useAttach, int isOptional){
10521052
char *zDbName;
10531053
char *zHome;
10541054
if( g.zConfigDbName ){
1055
- int alreadyAttached = db_database_slot("configdb")>=0;
1055
+ int alreadyAttached = db_database_slot("configdb")>0;
10561056
if( useAttach==alreadyAttached ) return 1; /* Already open. */
10571057
db_close_config();
10581058
}
10591059
zHome = fossil_getenv("FOSSIL_HOME");
10601060
#if defined(_WIN32) || defined(__CYGWIN__)
10611061
--- 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

Keyboard Shortcuts

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