]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Include hostname in temporary file name to avoid NFS race
authorWilson Snyder <wsnyder@wsnyder.org>
Sun, 9 May 2010 11:28:34 +0000 (13:28 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 9 May 2010 11:28:34 +0000 (13:28 +0200)
util.c

diff --git a/util.c b/util.c
index e10e1ca9c2b894e7563b891a58911bb251f4d9c5..030deee980e790848af81ab81b5de71370948fcd 100644 (file)
--- a/util.c
+++ b/util.c
@@ -124,7 +124,7 @@ int copy_file(const char *src, const char *dest, int compress_dest)
        mode_t mask;
        struct stat st;
 
-       x_asprintf(&tmp_name, "%s.XXXXXX", dest);
+       x_asprintf(&tmp_name, "%s.%s.XXXXXX", dest, tmp_string());
 
        /* open source file */
        fd_in = open(src, O_RDONLY);