From cdd5f101880adf5c78b5e126164d3af04f6a9263 Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Sat, 18 Feb 2017 19:55:21 -0800 Subject: Correctly report 0 compression when nothing has yet been written. --- tar/write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tar/write.c') diff --git a/tar/write.c b/tar/write.c index fb8bb92b..532abb23 100644 --- a/tar/write.c +++ b/tar/write.c @@ -1010,7 +1010,7 @@ report_write(struct bsdtar *bsdtar, struct archive *a, uncomp = archive_filter_bytes(a, 0); fprintf(stderr, "In: %d files, %s bytes;", archive_file_count(a), tar_i64toa(uncomp)); - if (comp > uncomp) + if (comp >= uncomp) compression = 0; else compression = (int)((uncomp - comp) * 100 / uncomp); -- cgit v1.2.1