From 0cc230af33c1efd778501873ac4bc6179a265566 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 7 Aug 2004 19:21:18 +0000 Subject: [PATCH] Don't forget to count the end-of-file padding as part of the finished file size. --- lib/libarchive/archive_write_set_compression_gzip.c | 1 + lib/libarchive/archive_write_set_compression_none.c | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/libarchive/archive_write_set_compression_gzip.c b/lib/libarchive/archive_write_set_compression_gzip.c index ca55410d25be..003cf2b55895 100644 --- a/lib/libarchive/archive_write_set_compression_gzip.c +++ b/lib/libarchive/archive_write_set_compression_gzip.c @@ -308,6 +308,7 @@ archive_compressor_gzip_finish(struct archive *a) /* Write the last block */ ret = (a->client_writer)(a, a->client_data, state->compressed, block_length); + a->raw_position += ret; /* Cleanup: shut down compressor, release memory, etc. */ cleanup: diff --git a/lib/libarchive/archive_write_set_compression_none.c b/lib/libarchive/archive_write_set_compression_none.c index 99347b04fdf5..7a598c688272 100644 --- a/lib/libarchive/archive_write_set_compression_none.c +++ b/lib/libarchive/archive_write_set_compression_none.c @@ -195,6 +195,7 @@ archive_compressor_none_finish(struct archive *a) } ret = (a->client_writer)(a, a->client_data, state->buffer, block_length); + a->raw_position += ret; } /* Close the output */