From: Joel Rosdahl Date: Mon, 19 Dec 2011 19:59:53 +0000 (+0100) Subject: Make failure to create files in cache fatal X-Git-Tag: v3.1.7~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3595be06de93cb8c4255171be8a647af4e5d460d;p=thirdparty%2Fccache.git Make failure to create files in cache fatal Previously, such failures were erroneously flagged as "compiler produced stdout". --- diff --git a/ccache.c b/ccache.c index 9f6d003c4..e35916885 100644 --- a/ccache.c +++ b/ccache.c @@ -529,7 +529,10 @@ to_cache(struct args *args) status = execute(args->argv, tmp_stdout, tmp_stderr); args_pop(args, 3); - if (stat(tmp_stdout, &st) != 0 || st.st_size != 0) { + if (stat(tmp_stdout, &st) != 0) { + fatal("Could not create %s (permission denied?)", tmp_stdout); + } + if (st.st_size != 0) { cc_log("Compiler produced stdout"); stats_update(STATS_STDOUT); tmp_unlink(tmp_stdout);