goto report_write_error;
#ifdef HAVE_FTRUNCATE
- if (inplace && fd != -1)
- ftruncate(fd, offset);
+ if (inplace && fd != -1) {
+ if (ftruncate(fd, offset) < 0) {
+ rsyserr(FWARNING, errno, "ftruncate failed on %s",
+ full_fname(fname));
+ }
+ }
#endif
if (INFO_GTE(PROGRESS, 1))