This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Filenames with Win32 special characters (or: Interix filename compatibility)


On Jul 11 14:21, Eric Blake wrote:
> According to Corinna Vinschen on 7/11/2008 11:17 AM:
>> So, wouldn't it make sense to have two mount options, one for the char
>> conversion ("managed") and one for case sensitivity ("case", "posix")?
>
> I've already been enjoying the fact that 1.7.0 (to date) has made using 
> special characters like '<' much easier, without needing a mount option. 
> But I can also understand the goal of wanting to prohibit filenames that 
> Win32 can't handle in certain directories, whether we can use special char 
> mapping or NT-level case sensitive flags to create file names that Win32 
> doesn't handle nicely.  I think having multiple mount options for the 
> different things to tweak (0xff00 masking and case-sensitivity) is useful, 
> but wonder if defaults when mount options are not used should favor POSIX 
> at the expense of Win32, rather than requiring lots of mount table entries 
> just to get POSIX file name capabilities.

On second (third? forth?) thought, I guess we can stick to the special
char handling by default as it is.  The advantage would be that we only
have to re-think the case sensitivity options and even for NFS shares,
only files with colon or the pipe symbol are affected.  Files like
"a<b", "a>b", "a*b" are always inaccessible from Windows anyway.  So,
back to case sensitivity.

What bugs me with the hand-crafted case sensitivity in the "managed"
case is the fact that it only works for ASCII chars.  Every other native
language user has a problem or two.  That's why "real" case-sensitivity
with OS support would be preferrable from my point of view.

But case sensitivity by default?  Assume the user didn't change the
obcaseinsensitivity registry key but Cygwin plays case sensitive by
default.  The OS would ignore the request, so the operations are still
case insensitive.  But Cygwin would skip all tests for case preserving
border cases, like in rename("FoO", "foo").  From the top of my head I'm
not sure how the result would look like, but it might be strange.

What if Cygwin checks itself for the obcaseinsensitivity registry key
and takes it into account?  If the user *made* the choice, we could be
case sensitive by default and only case insensitive on mount points
with the "nocase" (or whatever) option.  Otherwise, if the registry
key isn't set, all operations are case insensitive as usual.  As for
the managed mounts, we could drop them entirely

Good?  Bad?  Ugly?


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]