On Thu, Jul 05, 2001 at 10:19:33PM -0400, David Bolen wrote:
> We do a bunch of distribution to remote machines (under Windows NT) using
> compare-dest to make use of existing files on those machines when possible.
> Up until now, the comparison directory has always been at least one level
> down in the directory hierarchy, but we've just started doing full recursive
> distributions of files that have a mirror structure to our C: drive itself,
> and I think I've run into a buglet with --compare-dest.
> 
> The code that uses the compare-dest value blindly builds up the comparison
> using "%s/%s" (with compare-dest and filename), so if you set
> --compare-dest=/, you end up with filenames like "//<dir>/name" - the
> leading double slash may not matter under most Unixes, but it does under
> Windows (Cygwin still uses it as a UNC path) and I think POSIX permits such
> a path to be system-specific (// inside a path must be ignored, but at the
> start can do special stuff).
> 
> Anyway, a quick workaround appears to be to use "/." rather than just "/"
> for compare-dest (or actually, since it's Windows, using "C:" works too),
> but I'm guessing it's something that should probably be handled inside of
> rsync better?


Perhaps it should be using clean_fname().  Please try making a fix using
clean_fname() or some other way if it looks better, test it out, and submit
a patch.  I wrote that option so I'll make sure the patch gets in if I
think it looks good.

- Dave Dykstra

Reply via email to