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

Wayne Davison wayned at samba.org
Sat Aug 2 02:57:15 EST 2003

On Fri, Aug 01, 2003 at 01:51:53AM -0700, jw schultz wrote:
> If for some reason they specify
> 	--suffix=~ --backup-dir=../foo
> it should create the backup files with the requested suffix.

Yes, I totally agree.  Fortunately, that's what the code does.

> We want to send the suffix if they specified one even if they
> specified the default.

No, there's no need to do that.  What you're missing is that the default
is "" when they specified --backup-dir, so the code only sends the
suffix if it is not a null string in that case.  If they specified
--suffix=~, it gets sent when --backup-dir was specified.  (We don't
send '~' only when --backup-dir was _not_ specified.)


More information about the rsync mailing list