From e27b51a85a41d243c2708bcbb8de737f2a0783fb Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 28 Mar 2002 22:38:41 +0100 Subject: [PATCH] fixed a copy_file() race condition --- ccache.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ccache.c b/ccache.c index fa632e464..40e66c2df 100644 --- a/ccache.c +++ b/ccache.c @@ -275,9 +275,9 @@ static void from_cache(int first) } free(stderr_file); - if (ret == -1 && errno != ENOENT) { + if (ret == -1) { ret = copy_file(hashname, output_file); - if (ret == -1 && errno != ENOENT) { + if (ret == -1) { cc_log("failed to copy %s -> %s (%s)\n", hashname, output_file, strerror(errno)); failed(); -- 2.47.3