aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2011-01-21 09:37:19 +0200
committerTimo Teräs <timo.teras@iki.fi>2011-01-25 13:24:35 +0200
commitb33b068076de1a5e9e403d61f4b3d2891f832cf6 (patch)
tree7cabc4272de0d1d06f7e693c8953487bd05ccfca
parent3dfc9d3303a2fe35ebd6e7fd41e61726d209b671 (diff)
downloadapk-tools-b33b068076de1a5e9e403d61f4b3d2891f832cf6.tar.bz2
apk-tools-b33b068076de1a5e9e403d61f4b3d2891f832cf6.tar.xz
db: fix package caching
(cherry picked from commit 1c6ab67984b20b49ed12a0576e59cd446a44ae84)
-rw-r--r--src/database.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c
index 5edc604..a7cab34 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2059,9 +2059,9 @@ static int apk_db_unpack_pkg(struct apk_database *db,
if (need_copy) {
if (r == 0)
- renameat(db->cachetmp_fd, file, db->cache_fd, file);
+ renameat(db->cachetmp_fd, item, db->cache_fd, item);
else
- unlinkat(db->cachetmp_fd, file, 0);
+ unlinkat(db->cachetmp_fd, item, 0);
}
if (r != 0) {