summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2017-06-26 10:53:52 +0300
committerTimo Teräs <timo.teras@iki.fi>2017-06-26 10:59:37 +0300
commit51ec463e9d9b5e5c20e1e476870b19f14f856456 (patch)
tree0d50936bb6526c2f4ea125ee5f4161fdd46b6e9d
parent17dd532e428e647e9d977e727c87c0f3a4e93ae3 (diff)
downloadapk-tools-51ec463e9d9b5e5c20e1e476870b19f14f856456.tar.gz
apk-tools-51ec463e9d9b5e5c20e1e476870b19f14f856456.tar.bz2
apk-tools-51ec463e9d9b5e5c20e1e476870b19f14f856456.tar.xz
apk-tools-51ec463e9d9b5e5c20e1e476870b19f14f856456.zip
db: fix current directory instance caching in tar extraction
Depending how the directory entries are ordered, the cached dir instance might not have been updated correctly. This has not been a problem as the entries have been ordered, but is now triggered on ppc.
-rw-r--r--src/database.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/database.c b/src/database.c
index 7c3c646..ab6a8cb 100644
--- a/src/database.c
+++ b/src/database.c
@@ -2409,7 +2409,7 @@ static int apk_db_install_archive_entry(void *_ctx,
return 0;
/* Make sure the file is part of the cached directory tree */
- diri = find_diri(ipkg, bdir, diri, &ctx->file_diri_node);
+ diri = ctx->diri = find_diri(ipkg, bdir, diri, &ctx->file_diri_node);
if (diri == NULL) {
if (!APK_BLOB_IS_NULL(bdir)) {
apk_error(PKG_VER_FMT": "BLOB_FMT": no dirent in archive",