diff options
author | Tim Kientzle <kientzle@acm.org> | 2017-02-18 19:55:21 -0800 |
---|---|---|
committer | Tim Kientzle <kientzle@acm.org> | 2017-02-18 19:55:21 -0800 |
commit | cdd5f101880adf5c78b5e126164d3af04f6a9263 (patch) | |
tree | 4089718085b057e561fd57b8ed3dad880171b7e5 /tar/write.c | |
parent | 891bf1056cfc6cb38bba73dee17157ab7cea0e04 (diff) | |
download | libarchive-cdd5f101880adf5c78b5e126164d3af04f6a9263.tar.gz |
Correctly report 0 compression when nothing has yet been written.
Diffstat (limited to 'tar/write.c')
-rw-r--r-- | tar/write.c | 2 |
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); |