From: Tim Kientzle Date: Sun, 19 Feb 2017 03:55:21 +0000 (-0800) Subject: Correctly report 0 compression when nothing has yet been written. X-Git-Tag: v3.3.0~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cdd5f101880adf5c78b5e126164d3af04f6a9263;p=thirdparty%2Flibarchive.git Correctly report 0 compression when nothing has yet been written. --- diff --git a/tar/write.c b/tar/write.c index fb8bb92b2..532abb238 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);