summaryrefslogtreecommitdiff
path: root/src/extract_v3.c
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-09-03 16:29:55 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-10-27 16:14:45 +0300
commit40f08663679246edaa578d87e9f153adaad62a87 (patch)
treefb7752c055af85656af4f5a3324d795efbdaf642 /src/extract_v3.c
parent9bd1e95e5be92e9db3e0f59e3920105c2f578846 (diff)
downloadapk-tools-40f08663679246edaa578d87e9f153adaad62a87.tar.gz
apk-tools-40f08663679246edaa578d87e9f153adaad62a87.tar.bz2
apk-tools-40f08663679246edaa578d87e9f153adaad62a87.tar.xz
apk-tools-40f08663679246edaa578d87e9f153adaad62a87.zip
db, add: support adding v3 package files
Diffstat (limited to 'src/extract_v3.c')
-rw-r--r--src/extract_v3.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/extract_v3.c b/src/extract_v3.c
index a5a1459..dcc5c24 100644
--- a/src/extract_v3.c
+++ b/src/extract_v3.c
@@ -93,6 +93,8 @@ static int apk_extract_v3_file(struct apk_extract_ctx *ectx, off_t sz, struct ap
fi.mode |= S_IFREG;
r = ectx->ops->file(ectx, &fi, apk_istream_verify(&dis, is, &fi.digest));
+ if (r == APK_EXTRACT_SKIP_FILE)
+ return 0;
return apk_istream_close_error(&dis.is, r);
}
@@ -255,6 +257,7 @@ int apk_extract_v3(struct apk_extract_ctx *ectx, struct apk_istream *is)
}
}
if (r == -ECANCELED) r = 0;
+ if (r == 0 && !ctx.db.adb.len) r = -APKE_ADB_BLOCK;
adb_free(&ctx.db);
apk_extract_reset(ectx);