diff options
author | Wayne Davison <wayned@samba.org> | 2006-09-20 01:53:32 +0000 |
---|---|---|
committer | Wayne Davison <wayned@samba.org> | 2006-09-20 01:53:32 +0000 |
commit | acee1ad8535ae59bda9585b422efe54b68e1f234 (patch) | |
tree | d770ba732d271b96b4ed49c3419b213669d468dd /sender.c | |
parent | 8f4ae68ca7f1114c76494c0a2d56badd72f2ac32 (diff) | |
download | rsync-acee1ad8535ae59bda9585b422efe54b68e1f234.tar.gz rsync-acee1ad8535ae59bda9585b422efe54b68e1f234.tar.bz2 rsync-acee1ad8535ae59bda9585b422efe54b68e1f234.zip |
Complain if a --remove-s*-files option is set and we can't remove
the source file.
Diffstat (limited to 'sender.c')
-rw-r--r-- | sender.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -134,8 +134,13 @@ void successful_send(int ndx) } else offset = 0; f_name(file, fname + offset); - if (remove_source_files && do_unlink(fname) == 0 && verbose > 1) - rprintf(FINFO, "sender removed %s\n", fname + offset); + if (remove_source_files) { + if (do_unlink(fname) == 0) { + if (verbose > 1) + rprintf(FINFO, "sender removed %s\n", fname + offset); + } else + rsyserr(FERROR, errno, "sender failed to remove %s", fname + offset); + } } static void write_ndx_and_attrs(int f_out, int ndx, int iflags, |