summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-07-20 05:36:25 +0000
committerAndrew Tridgell <tridge@samba.org>1998-07-20 05:36:25 +0000
commitc46ded46212c2ea55e43ec661b5a724718a63ec2 (patch)
treee3fd43e0ae833ea6d1981c8962282f9d30f2f5ad /util.c
parent8cd9fd4e8c293047162784ae08c12be3636b9353 (diff)
downloadrsync-c46ded46212c2ea55e43ec661b5a724718a63ec2.tar.gz
I think I might havefinally fixed the rsync hanging bug. It was caused
by a read during an io_flush() triggered during a readfd(). A simple logic bug in the io code :(
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index bfa35f18..cc626d79 100644
--- a/util.c
+++ b/util.c
@@ -291,7 +291,7 @@ int copy_file(char *source, char *dest, mode_t mode)
}
ofd = do_open(dest, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, mode);
- if (ofd < 0) {
+ if (ofd == -1) {
rprintf(FERROR,"open %s: %s\n",
dest,strerror(errno));
close(ifd);