From aade88bfc247091081fbe33834339f69d894ad9b Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sat, 15 Nov 2008 14:49:28 -0800 Subject: An ftruncate() failure should result in FERROR_XFER. --- receiver.c | 9 ++++----- 1 file 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 -- cgit v1.2.3