summaryrefslogtreecommitdiff
path: root/tar/write.c
diff options
context:
space:
mode:
authorTim Kientzle <kientzle@acm.org>2017-02-18 19:55:21 -0800
committerTim Kientzle <kientzle@acm.org>2017-02-18 19:55:21 -0800
commitcdd5f101880adf5c78b5e126164d3af04f6a9263 (patch)
tree4089718085b057e561fd57b8ed3dad880171b7e5 /tar/write.c
parent891bf1056cfc6cb38bba73dee17157ab7cea0e04 (diff)
downloadlibarchive-cdd5f101880adf5c78b5e126164d3af04f6a9263.tar.gz
Correctly report 0 compression when nothing has yet been written.
Diffstat (limited to 'tar/write.c')
-rw-r--r--tar/write.c2
1 files changed, 1 insertions, 1 deletions
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);