From 3595be06de93cb8c4255171be8a647af4e5d460d Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 19 Dec 2011 20:59:53 +0100 Subject: [PATCH] Make failure to create files in cache fatal Previously, such failures were erroneously flagged as "compiler produced stdout". --- ccache.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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); -- 2.47.2