[PATCH] Make make_backup switch on backup_dir_dels, not
backup_dir, for deletions.
matt at mattmccutchen.net
Wed Mar 12 00:24:26 GMT 2008
On Tue, 2008-03-11 at 18:38 -0400, Robert DuToit wrote:
> On Mar 11, 2008, at 12:50 AM, Matt McCutchen wrote:
> > ---
> > This should fix the problem with --backup-dir-dels not working by
> I tried all the patches you posted last night for dir-dels following
> these patches:
> patch -p1 <patches/fileflags.diff
> patch -p1 <patches/crtimes.diff
> patch -p1 <patches/fileflags-fixes.diff
> patch -p1 <patches/backup-dir-dels.diff
> but --backup-dir-dels still only seems to work with --backup-dir
That's weird. The patch worked for me. If you're doing a remote copy,
make sure you patched the receiving rsync because it's the one that
matters. If that isn't the problem, please provide your command line
and -vvv output and I'll try to get to the bottom of it.
> Should I have skipped the original backup-dir-dels.diff patch?
> Also I'm sure this isn't possible but I mentioned before the suffix
> option causes Mac package files(applications) to add the suffix to all
> the resources within and render it useless. Is there a way to add the
> suffix to just the name of a directory or a file instead of tacking it
> on to the extension name?
No. It would not be hard to solve the extension-corrupting problem by
modifying rsync to add the suffix, say, before the last period in the
filename. More generally, rsync could apply a regular-expression
substitution (s///) to the filename; is there a library that does these?
To handle packages (bundles?) correctly, rsync would also need a list of
name patterns for directories that it should back up "as a whole"
instead of backing up the individual files inside. Of course, using a
backup dir instead of a suffix avoids the problem entirely.
More information about the rsync