summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-30 04:46:20 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-30 04:48:24 (EDT)
commit5fc9fd125430db57f352f978867ac1dfb63bc1d0 (patch)
treed23da4608ecd0602f87f774c1951c39be0075fdb
parent3f29b6d136d87ae5ca15c9f839b0e406e8aa1b71 (diff)
ustar: Fix trailer writing
-rw-r--r--src/ustar.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ustar.c b/src/ustar.c
index f14a3d4..3c57ba5 100644
--- a/src/ustar.c
+++ b/src/ustar.c
@@ -363,7 +363,8 @@ opkg_opk_ustar_write_trailer(struct opkg_opk_ustar *ustar)
if (opkg_opk_gzip_write(ustar->gzip, ustar->record,
OPKG_OPK_USTAR_RECORD_SIZE, 0) != OPKG_OPK_OK ||
opkg_opk_gzip_write(ustar->gzip, ustar->record,
- OPKG_OPK_USTAR_RECORD_SIZE, 0) != OPKG_OPK_OK) {
+ OPKG_OPK_USTAR_RECORD_SIZE, 1) != OPKG_OPK_END)
+ {
return OPKG_OPK_ERROR;
}
return OPKG_OPK_OK;