www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/2003/01/22/12:21:01

Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-developers-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT cygwin DOT com>
List-Help: <mailto:cygwin-developers-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-developers-owner AT cygwin DOT com
Delivered-To: mailing list cygwin-developers AT cygwin DOT com
From: "Gerald S. Williams" <gsw AT agere DOT com>
To: <cygwin-developers AT cygwin DOT com>
Subject: RE: True case-sensitive filenames
Date: Wed, 22 Jan 2003 12:20:57 -0500
Message-ID: <GBEGLOMMCLDACBPKDIHFOEBNDBAA.gsw@agere.com>
MIME-Version: 1.0
X-Priority: 3 (Normal)
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Importance: Normal
In-Reply-To: <20030121205913.GH17699@redhat.com>

Christopher Faylor wrote:
> I don't know if the requirements for getting case sensitivity
> working on NT could be abstractable into something that would
> allow for future expansion into, oh, I don't know, nfs or
> something but I think it is worthwhile to consider not just
> adding a bunch of "ifs" to the code but going for something
> that could be "plugged in" somehow.

I'm not sure exactly how far you're talking about
going. It sounds like you're suggesting something
that I would have thought goes against the grain
of what Cygwin generally does.

Are you talking about ways to add case-sensitivity
to a truly case-insensitive file system? I've seen
NFS clients that did this. They used reversible
mapping tricks such as replacing "My_file" with
"_my__file" (I'd prefer "%4Dy_file" myself).

If you want a truly generic approach for Win95-like
clients, you may have to do something similar. E.g.,
if you have two conflicting files/directories, you
rename both according to a similar trick (possibly
moving them into a subdirectory of that name if you
want to make the situation more obvious to Windows
clients). Short of accessing the underlying file
system directly, some trick like that is needed to
support case-sensitive directory naming and/or to
avoid using copy-delete to rename files on those
platforms.

I wasn't planning to go that far (and was willing
to forgo Win95 support entirely for the sake of
having a robust solution). If you're willing to
constrain this feature to NT/XP clients, you can
always drop into the Native API. You could then
argue that it's really the responsibility of the
NFS driver to support case-sensitivity for NT.

However far you intend to go, it probably makes
sense to encapsulate these operations into a small
set of case-sensitive functions. That would allow
you to extend case-sensitivity to other platforms
if you were so inclined.

-Jerry

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019