extract: remove redundant file unlink on failure path

apk_extract_file() already calls unlink if the error is fatal.
cute-signatures
Timo Teräs 2021-09-03 13:47:04 +03:00
parent fd42c073bf
commit 984cd3e0b6
1 changed files with 0 additions and 1 deletions

View File

@ -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;