From 378a15aa85a0f80ecc4a2868e5f298d34e9d9dc8 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Sat, 16 Jul 2011 17:31:53 +0200 Subject: [PATCH] config: Use hard_link from conf struct --- ccache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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); -- 2.47.3