get_local_name

Matt McCutchen hashproduct at verizon.net
Fri Feb 24 23:12:35 GMT 2006


On Fri, 2006-02-24 at 10:45 -0800, Wayne Davison wrote:
> On Thu, Feb 23, 2006 at 11:12:07PM -0500, Matt McCutchen wrote:
> > I have redone get_local_name again (patch attached), this time to
> > enable rsync to remove a file to make way for a destination directory;
> 
> I don't wish to do this, as this is not how cp behaves and I want to
> keep the behavior the same as cp.

Well, I reasoned it didn't make sense for rsync to overwrite files with
empty directories but not with nonempty ones, so I erred on the side of
more functionality.  Now I see that cp refuses to overwrite a file with
any directory, empty or not.  I attach a newer version of the patch with
the attempt to unlink the destination replaced with an error message,
among other improvements.

So in summary, the behavior of my get_local_name now differs in these
ways from that of the current one:

(1) Transferring a single empty directory is lumped in with transferring
multiple files as needing a destination directory.
(2) --keep-dirlinks is obeyed.
(3) If rsync cannot stat the destination, it errors out immediately.
-- 
Matt McCutchen
hashproduct at verizon.net
http://hashproduct.metaesthetics.net/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: redo-get_local_name.diff
Type: text/x-patch
Size: 3864 bytes
Desc: not available
Url : http://lists.samba.org/archive/rsync/attachments/20060224/e3e3a363/redo-get_local_name.bin


More information about the rsync mailing list