diff options
author | Aurelien Foret <aurelien@archlinux.org> | 2006-03-04 14:58:28 +0000 |
---|---|---|
committer | Aurelien Foret <aurelien@archlinux.org> | 2006-03-04 14:58:28 +0000 |
commit | 297c5284b6364c94c2ea2b8911a912a3bfa2ce1e (patch) | |
tree | 80a849ec6ce74eccb469c35e259fa24ce6eb081c /lib/libalpm/alpm.c | |
parent | 7e9b70a20809f8a2472ba3a8e74ebf86fb6bf40d (diff) | |
download | pacman-297c5284b6364c94c2ea2b8911a912a3bfa2ce1e.tar.xz |
fixed alpm_db_update extraction path
Diffstat (limited to 'lib/libalpm/alpm.c')
-rw-r--r-- | lib/libalpm/alpm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libalpm/alpm.c b/lib/libalpm/alpm.c index 19e26363..897ed8f3 100644 --- a/lib/libalpm/alpm.c +++ b/lib/libalpm/alpm.c @@ -301,6 +301,7 @@ void *alpm_db_getinfo(PM_DB *db, unsigned char parm) int alpm_db_update(PM_DB *db, char *archive) { PMList *lp; + char path[PATH_MAX]; /* Sanity checks */ ASSERT(handle != NULL, RET_ERR(PM_ERR_HANDLE_NULL, -1)); @@ -331,8 +332,9 @@ int alpm_db_update(PM_DB *db, char *archive) /* ORE we should not simply unpack the archive, but better parse it and db_write each entry (see sync_load_dbarchive to get archive content) */ + snprintf(path, PATH_MAX, "%s/%s", db->path, db->treename); _alpm_log(PM_LOG_FLOW2, "unpacking %s", archive); - if(_alpm_unpack(archive, db->path, NULL)) { + if(_alpm_unpack(archive, path, NULL)) { RET_ERR(PM_ERR_SYSTEM, -1); } |