From 1eef4547400f2ba0c49db4a47e0413612b81cc43 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sun, 13 Sep 2015 14:35:26 +0200 Subject: [PATCH] Use correct compression level when copying into the cache --- NEWS.txt | 2 ++ ccache.c | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/NEWS.txt b/NEWS.txt index ffb97cd67..7d21063f5 100644 --- 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 ------------ diff --git a/ccache.c b/ccache.c index 1dbbc7efe..ca7097740 100644 --- 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", -- 2.47.2