summaryrefslogtreecommitdiff
path: root/src/adb.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/adb.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/adb.c')
-rw-r--r--src/adb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/adb.c b/src/adb.c
index f1a4937..ee992cf 100644
--- a/src/adb.c
+++ b/src/adb.c
@@ -253,11 +253,11 @@ static int __adb_m_stream(struct adb *db, struct apk_istream *is, uint32_t expec
} while (1);
err:
if (r > 0) r = -APKE_ADB_BLOCK;
- if (r == 0) {
+ if (r == 0 || r == -ECANCELED) {
if (!trusted) r = -APKE_SIGNATURE_UNTRUSTED;
else if (!db->adb.ptr) r = -APKE_ADB_BLOCK;
}
- if (r != 0) {
+ if (r != 0 && r != -ECANCELED) {
free(db->adb.ptr);
db->adb = APK_BLOB_NULL;
}