"-b --suffix '' --delete --backup-dir /path/" combination does
not act as expected
jw schultz
jw at pegasys.ws
Fri Aug 1 06:37:59 EST 2003
On Thu, Jul 31, 2003 at 11:36:57AM -0700, Wayne Davison wrote:
> 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
> not.
>
> 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.
Have at it!
The only real reason for my counter-patch was the state of
that code. One shouldn't have to puzzle over that few lines
of code to comprehend what it is doing unless it is critical
fast-path. I'd pretty much refactored the conditional by
the time i was sure what it was doing to even evealuate the
patch. If i have to do that the code is more difficult to
support that in needs to be. A refactoring of outer the
loop seemes in order; with a lot more whitespace.
--
________________________________________________________________
J.W. Schultz Pegasystems Technologies
email address: jw at pegasys.ws
Remember Cernan and Schmitt
More information about the rsync
mailing list