summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2021-09-03 13:47:04 +0300
committerTimo Teräs <timo.teras@iki.fi>2021-09-03 13:47:04 +0300
commit984cd3e0b60d744e0b887ba2340c78b85eb991eb (patch)
treeb675fcea548288d56a162c154d25c1524cfea37d /src
parentfd42c073bf77d37562851ae84cfce1a3a5feb818 (diff)
downloadapk-tools-984cd3e0b60d744e0b887ba2340c78b85eb991eb.tar.gz
apk-tools-984cd3e0b60d744e0b887ba2340c78b85eb991eb.tar.bz2
apk-tools-984cd3e0b60d744e0b887ba2340c78b85eb991eb.tar.xz
apk-tools-984cd3e0b60d744e0b887ba2340c78b85eb991eb.zip
extract: remove redundant file unlink on failure path
apk_extract_file() already calls unlink if the error is fatal.
Diffstat (limited to 'src')
-rw-r--r--src/app_extract.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/app_extract.c b/src/app_extract.c
index 0d13db1..c2836da 100644
--- a/src/app_extract.c
+++ b/src/app_extract.c
@@ -151,7 +151,6 @@ static int extract_file(struct apk_extract_ctx *ectx, const struct apk_file_info
} else {
r = apk_extract_file(ctx->root_fd, fi, 0, 0, is, 0, 0, 0,
ctx->extract_flags, &ectx->ac->out);
- if (r != 0) unlinkat(ctx->root_fd, fi->name, 0);
}
if (is) r = apk_istream_close_error(is, r);
return r;