Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Don't try and init the DB every time
Matthew Seaman committed 13 years ago
commit 6a0c2fd25bd7cee7a38c08948a0e46a67ad87bca
parent 031cb10
1 file changed +2 -1
modified libpkg/pkgdb.c
@@ -760,7 +760,7 @@ pkgdb_open(struct pkgdb **db_p, pkgdb_t type)
		sqlite3_busy_timeout(db->sqlite, 5000);

		/* If the database is missing we have to initialize it */
-
		if (create == true)
+
		if (create == true) {
			if (mkdirs(dbdir) != EPKG_OK) {
				pkgdb_close(db);
				return (EPKG_FATAL);
@@ -769,6 +769,7 @@ pkgdb_open(struct pkgdb **db_p, pkgdb_t type)
				pkgdb_close(db);
				return (EPKG_FATAL);
			}
+
		}

		/* Create our functions */
		sqlcmd_init(db->sqlite, NULL, NULL);