From: Joel Rosdahl Date: Sat, 16 Jul 2011 15:31:53 +0000 (+0200) Subject: config: Use hard_link from conf struct X-Git-Tag: v3.2~224 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=378a15aa85a0f80ecc4a2868e5f298d34e9d9dc8;p=thirdparty%2Fccache.git config: Use hard_link from conf struct --- diff --git a/ccache.c b/ccache.c index 307d307d0..f6bf79b20 100644 --- a/ccache.c +++ b/ccache.c @@ -1063,7 +1063,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) } else { x_unlink(output_obj); /* only make a hardlink if the cache file is uncompressed */ - if (getenv("CCACHE_HARDLINK") && !file_is_compressed(cached_obj)) { + if (conf->hard_link && !file_is_compressed(cached_obj)) { ret = link(cached_obj, output_obj); } else { ret = copy_file(cached_obj, output_obj, 0); @@ -1093,7 +1093,7 @@ from_cache(enum fromcache_call_mode mode, bool put_object_in_manifest) if (produce_dep_file) { x_unlink(output_dep); /* only make a hardlink if the cache file is uncompressed */ - if (getenv("CCACHE_HARDLINK") && !file_is_compressed(cached_dep)) { + if (conf->hard_link && !file_is_compressed(cached_dep)) { ret = link(cached_dep, output_dep); } else { ret = copy_file(cached_dep, output_dep, 0);