From: Wilson Snyder Date: Sun, 9 May 2010 11:28:34 +0000 (+0200) Subject: Include hostname in temporary file name to avoid NFS race X-Git-Tag: v3.0pre1~21 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f2c7aa91df7c0aa619631f7393014b3b022197f;p=thirdparty%2Fccache.git Include hostname in temporary file name to avoid NFS race --- diff --git a/util.c b/util.c index e10e1ca9c..030deee98 100644 --- 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);