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
Mention the mapfrom/mapto scripts and how they work.
[rsync/rsync.git]
/
receiver.c
diff --git
a/receiver.c
b/receiver.c
index
9164247
..
dee70c2
100644
(file)
--- a/
receiver.c
+++ b/
receiver.c
@@
-285,8
+285,11
@@
static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
goto report_write_error;
#ifdef HAVE_FTRUNCATE
goto report_write_error;
#ifdef HAVE_FTRUNCATE
- if (inplace && fd != -1)
- ftruncate(fd, offset);
+ if (inplace && fd != -1
+ && ftruncate(fd, offset) < 0) {
+ rsyserr(FERROR_XFER, errno, "ftruncate failed on %s",
+ full_fname(fname));
+ }
#endif
if (INFO_GTE(PROGRESS, 1))
#endif
if (INFO_GTE(PROGRESS, 1))