From 93f7fc1233ed41b79bb5709739fb20d0cef4208a Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Mon, 7 Oct 2013 15:35:57 +0200 Subject: [PATCH] sqlite3-backend: move dbs to repository_dir with distromatic.db name --- src/backend-sqlite3.c | 2 +- src/distroquery.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend-sqlite3.c b/src/backend-sqlite3.c index f28a15e..9e29cec 100644 --- a/src/backend-sqlite3.c +++ b/src/backend-sqlite3.c @@ -461,7 +461,7 @@ generateSQLite(struct configTag *ct) char dbname[PATH_MAX]; int i; - snprintf(dbname, PATH_MAX, "%s%s.db", ct->configdefaults->html_basedir, ct->tag); + snprintf(dbname, PATH_MAX, "%sdistromatic.db", ct->repository_dir); unlink(dbname); if (sqlite3_open_v2(dbname, &db, SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, NULL)) { diff --git a/src/distroquery.c b/src/distroquery.c index 808a09a..302a51e 100644 --- a/src/distroquery.c +++ b/src/distroquery.c @@ -104,7 +104,7 @@ void printQueryData(char* repository_tag, char* query) { char dbname[PATH_MAX]; for (i = 0; i <= configtag->repository_level; i++) { - snprintf(dbname, PATH_MAX, "%s%s.db", configtag->configdefaults->html_basedir, configtag->repository[i]->tag); + snprintf(dbname, PATH_MAX, "%sdistromatic.db", configtag->repository[i]->repository_dir); if (sqlite3_open_v2(dbname, (sqlite3**)&configtag->repository[i]->db, SQLITE_OPEN_READONLY, NULL)) { if (configtag->repository[i]->db) sqlite3_close(configtag->repository[i]->db); fprintf(stderr, "ERROR: unable to open sqlite3 db %s; aborting.\n", dbname);