summaryrefslogtreecommitdiff
path: root/receiver.c
diff options
context:
space:
mode:
authorWayne Davison <wayned@samba.org>2008-11-15 14:49:28 -0800
committerWayne Davison <wayned@samba.org>2008-11-15 14:50:40 -0800
commitaade88bfc247091081fbe33834339f69d894ad9b (patch)
tree6c466cf404d8fe1b7a9474eb4725257f07a505e9 /receiver.c
parent3795dafd9744c54cc550549a214e7c287619e268 (diff)
downloadrsync-aade88bfc247091081fbe33834339f69d894ad9b.tar.gz
An ftruncate() failure should result in FERROR_XFER.
Diffstat (limited to 'receiver.c')
-rw-r--r--receiver.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/receiver.c b/receiver.c
index 7efd3d27..dee70c26 100644
--- a/receiver.c
+++ b/receiver.c
@@ -285,11 +285,10 @@ static int receive_data(int f_in, char *fname_r, int fd_r, OFF_T size_r,
goto report_write_error;
#ifdef HAVE_FTRUNCATE
- if (inplace && fd != -1) {
- if (ftruncate(fd, offset) < 0) {
- rsyserr(FWARNING, errno, "ftruncate failed on %s",
- full_fname(fname));
- }
+ if (inplace && fd != -1
+ && ftruncate(fd, offset) < 0) {
+ rsyserr(FERROR_XFER, errno, "ftruncate failed on %s",
+ full_fname(fname));
}
#endif