]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fixed a copy_file() race condition
authorAndrew Tridgell <tridge@samba.org>
Thu, 28 Mar 2002 21:38:41 +0000 (22:38 +0100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 28 Mar 2002 21:38:41 +0000 (22:38 +0100)
ccache.c

index fa632e46426e9136db874c47622b362b7c0d4a3d..40e66c2df8a43fdb4e19a7d0e9c7b4c9dea1b811 100644 (file)
--- 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();