From f6c55b3c3f395839c0973c36b7a7e05984636a61 Mon Sep 17 00:00:00 2001 From: Allan McRae Date: Tue, 14 Jul 2015 21:45:59 +1000 Subject: Allow frontends to specify the sync database extension This allows frontends to select between the .db and .files databases currently supplied by repo-add or any other compatible database. Signed-off-by: Allan McRae --- lib/libalpm/alpm.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/libalpm/alpm.c') diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 21102860..d77b43ab 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -64,6 +64,9 @@ alpm_handle_t SYMEXPORT *alpm_initialize(const char *root, const char *dbpath, goto cleanup; } + /* set default database extension */ + STRDUP(myhandle->dbext, ".db", goto cleanup); + lockfilelen = strlen(myhandle->dbpath) + strlen(lf) + 1; myhandle->lockfile = calloc(lockfilelen, sizeof(char)); snprintf(myhandle->lockfile, lockfilelen, "%s%s", myhandle->dbpath, lf); -- cgit v1.2.3-24-g4f1b