]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Correctly report 0 compression when nothing has yet been written.
authorTim Kientzle <kientzle@acm.org>
Sun, 19 Feb 2017 03:55:21 +0000 (19:55 -0800)
committerTim Kientzle <kientzle@acm.org>
Sun, 19 Feb 2017 03:55:21 +0000 (19:55 -0800)
tar/write.c

index fb8bb92b26e90b0aac4b515355850b330e6ad0ee..532abb23883e05e6253356f94fe9efa0d189b98a 100644 (file)
@@ -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);