Matt McCutchen's Web Site
/
rsync
/
rsync.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
A slight refinement to my last patch.
[rsync/rsync.git]
/
util.c
diff --git
a/util.c
b/util.c
index
5129c35
..
9f28148
100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-281,6
+281,14
@@
int copy_file(char *source, char *dest, mode_t mode)
}
}
}
}
+ if (len < 0) {
+ rprintf(FERROR, "read %s: %s\n",
+ full_fname(source), strerror(errno));
+ close(ifd);
+ close(ofd);
+ return -1;
+ }
+
if (close(ifd) < 0) {
rprintf(FINFO, "close failed on %s: %s\n",
full_fname(source), strerror(errno));
if (close(ifd) < 0) {
rprintf(FINFO, "close failed on %s: %s\n",
full_fname(source), strerror(errno));
@@
-292,12
+300,6
@@
int copy_file(char *source, char *dest, mode_t mode)
return -1;
}
return -1;
}
- if (len < 0) {
- rprintf(FERROR,"read %s: %s\n",
- full_fname(source), strerror(errno));
- return -1;
- }
-
return 0;
}
return 0;
}