diff options
author | Wayne Davison <wayned@samba.org> | 2008-11-15 14:49:28 -0800 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2008-11-15 14:50:40 -0800 |
commit | aade88bfc247091081fbe33834339f69d894ad9b (patch) | |
tree | 6c466cf404d8fe1b7a9474eb4725257f07a505e9 | |
parent | 3795dafd9744c54cc550549a214e7c287619e268 (diff) | |
download | rsync-aade88bfc247091081fbe33834339f69d894ad9b.tar.gz rsync-aade88bfc247091081fbe33834339f69d894ad9b.tar.bz2 rsync-aade88bfc247091081fbe33834339f69d894ad9b.zip |
An ftruncate() failure should result in FERROR_XFER.
-rw-r--r-- | receiver.c | 9 |
1 files changed, 4 insertions, 5 deletions
@@ -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 |