]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Use correct compression level when copying into the cache
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 13 Sep 2015 12:35:26 +0000 (14:35 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 13 Sep 2015 12:35:26 +0000 (14:35 +0200)
NEWS.txt
ccache.c

index ffb97cd67d3094141dd473aade6b88fc95409894..7d21063f5339123a3c58a91d244baac9c36cc7ef 100644 (file)
--- a/NEWS.txt
+++ b/NEWS.txt
@@ -19,6 +19,8 @@ Bug fixes
 
 - Minor fixes related to Windows support.
 
+- The correct compression level is now used if compression is requested.
+
 
 ccache 3.2.3
 ------------
index 1dbbc7efe0ff6ec3e51c449d5ddd028a91714efa..ca7097740ffab79ed52fabee4bff0aa8f5214155 100644 (file)
--- a/ccache.c
+++ b/ccache.c
@@ -804,7 +804,8 @@ put_file_in_cache(const char *source, const char *dest)
                x_unlink(dest);
                ret = link(source, dest);
        } else {
-               ret = copy_file(source, dest, conf->compression);
+               ret = copy_file(
+                       source, dest, conf->compression ? conf->compress_level : 0);
        }
        if (ret != 0) {
                cc_log("Failed to %s %s to %s: %s",