mixed case file systems.

David Bolen db3l at fitlinxx.com
Fri Apr 19 10:17:02 EST 2002


Martin Pool [mbp at samba.org] writes:

> On 18 Apr 2002, David Bolen <db3l at fitlinxx.com> wrote:
> > A few caveats - both ends have to support the option - I couldn't make
> > it backwards compatible because both ends exchange information about a
> > sorted file list that has to sort the same way on either side (which
> > very subtly bit me when I first did this).
> 
> I was just going to say that :-)

Heh .. and wow, is it confusing if you mess that up.  Randomly
transferring files that it shouldn't be, but even better, putting the
contents of one file into another silently.  It seems to me that it
would have been better to have the side generating the list control
the sequence and the receiving side simply obey it as transmitted, but
that's neither here nor there at this point.

The issue with the new command line option was a general issue of
versioning command line options - since they get transmitted,
obviously, on the command line, it's prior to any option negotiation.
So I couldn't figure out any clean way to negotiate away from the
ignore case if the remote side didn't support it.  Originally I wanted
it to default to case-insensitive under Windows, but that was guaranteed
to break older versions, so I went back to an explicit option in all
cases.  But that seems to be a general issue with evolving options.

Actually, it was this issue that also led me to add a small bit of
code to io.c so that on an unexpected tag, it would dump any pending
data (as ASCII if printable, hex otherwise), since without that you
never got any of the remote command line parsing errors shown.  But
there are problems with that too since sometimes you may have a bunch
of data in the stream on a real protocol failure.

> I'll put this into the patches/ repository.  I'd like to study the 
> problem a bit more and see if there isn't a better solution before
> we merge it.  Perhaps something like the --fuzzy patch will make it
> detect them as renames.

No problem - aside from the options processing (which is also the bulk
of the patch), the patch does have the property that it's very simple;
one comparison routine change and one new flag supplied to the
existing fnmatch library module which already supported
case-insensitivity as an option.

-- David

/-----------------------------------------------------------------------\
 \               David Bolen            \   E-mail: db3l at fitlinxx.com  /
  |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
 /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
\-----------------------------------------------------------------------/




More information about the rsync mailing list