summaryrefslogtreecommitdiff
path: root/lib/libalpm/db.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/db.c')
-rw-r--r--lib/libalpm/db.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libalpm/db.c b/lib/libalpm/db.c
index 86165066..09e146e6 100644
--- a/lib/libalpm/db.c
+++ b/lib/libalpm/db.c
@@ -783,7 +783,11 @@ pmdb_t *_alpm_db_register_sync(const char *treename)
}
}
- db = _alpm_db_new(dbpath, treename);
+ /* Ensure the db gets the real path. */
+ path[0] = '\0';
+ snprintf(path, PATH_MAX, "%ssync/", dbpath);
+
+ db = _alpm_db_new(path, treename);
if(db == NULL) {
RET_ERR(PM_ERR_DB_CREATE, NULL);
}