summaryrefslogtreecommitdiff
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-21 09:37:19 +0200
commit1c6ab67984b20b49ed12a0576e59cd446a44ae84 (patch)
tree5ee19b7f4da5278c699b4bf8d23d4c7b5516f664
parent0e450c5fb6356f612ef0be98d2ffab854e90dc67 (diff)
downloadapk-tools-1c6ab67984b20b49ed12a0576e59cd446a44ae84.tar.gz
apk-tools-1c6ab67984b20b49ed12a0576e59cd446a44ae84.tar.bz2
apk-tools-1c6ab67984b20b49ed12a0576e59cd446a44ae84.tar.xz
apk-tools-1c6ab67984b20b49ed12a0576e59cd446a44ae84.zip
db: fix package caching
-rw-r--r--src/database.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/database.c b/src/database.c
index c985233..53a18c7 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2061,9 +2061,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) {