blob: bf51b25447e32fbe1729995fe1ce3a5dbb311078 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
--- rsync.c.orig Thu Jun 18 09:27:56 1998
+++ rsync.c Sat Jul 4 05:49:43 1998
@@ -879,6 +879,9 @@
continue;
}
+#ifdef HAVE_MKSTEMP
+ fd2 = mkstemp(fnametmp);
+#else
if (NULL == do_mktemp(fnametmp)) {
rprintf(FERROR,"mktemp %s failed\n",fnametmp);
receive_data(f_in,buf,-1,NULL);
@@ -894,6 +897,7 @@
this out */
fd2 = do_open(fnametmp,O_WRONLY|O_CREAT|O_EXCL,
file->mode & ACCESSPERMS);
+#endif
if (fd2 == -1 && relative_paths && errno == ENOENT &&
create_directory_path(fnametmp) == 0) {
|