--remove-sent-files errors with no output
Wayne Davison
wayned at samba.org
Wed Sep 20 01:55:32 GMT 2006
On Tue, Sep 19, 2006 at 03:47:38PM -0700, Eric Aiken wrote:
> What troubles me even is, using rsync -vvv, rsync shows no output
> relating to the --remove-sent-files option.
You would have seen the messages with just -vv if it were successful at
removing the files. For some strange reason, it wasn't outputting any
errors if it failed to remove the files, though. The following patch
changes this.
..wayne..
-------------- next part --------------
--- sender.c 30 Jun 2006 15:52:52 -0000 1.99
+++ sender.c 20 Sep 2006 01:50:01 -0000
@@ -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,
More information about the rsync
mailing list