"-b --suffix '' --delete --backup-dir /path/" combination does not act as expected

Wayne Davison wayned at samba.org
Fri Aug 1 04:36:57 EST 2003

On Mon, Jul 28, 2003 at 03:55:28PM -0700, jw schultz wrote:
> Any other developer's thoughts?

The original logic looks faulty to me in another way:  if a backup
directory was specified, the default suffix turns into nothing.  The
other code currently handles this in a really weird way by setting a
"suffix_specified" flag rather than making sure that the backup suffix
is set right.  Thus, this code in receiver.c is not dealing with the
backup suffix correctly when a directory was specified but a suffix was

I'm going to check-in some better code into options.c that will improve
this situation.  It will also pre-compute the length of the backup
suffix so that we don't have to keep calling strlen() on a constant-
length string.

As for the actual patch to receiver.c, I think your counter-patch looks
pretty good, but I think it can be simplifed a bit more.  I'll have more
time to look at this later.


More information about the rsync mailing list