delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
Subject: | RE: Re: Handling special characters (\/:*?"<>|) gracefully |
Date: | Tue, 23 May 2006 17:02:19 -0400 |
Message-ID: | <4C89134832705D4D85A6CD2EBF38AE0F3E0956@PAUMAILU03.ags.agere.com> |
From: | "Williams, Gerald S \(Jerry\)" <gsw AT agere DOT com> |
To: | <cygwin AT cygwin DOT com> |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
X-MIME-Autoconverted: | from quoted-printable to 8bit by delorie.com id k4NL2TbJ018933 |
mwoehlke wrote: > (Speaking of case sensitivity, is it a Windows limitation that Cygwin > can't do this? I'm pretty sure it isn't an NTFS limitation, > as Interix has true case-sensitivity.) You are right--NTFS can handle it, although the normal Windows file and directory handling routines cannot. Managed mounts deal with the problem by encoding the actual names stored in the underlying file system. I experimented with this approach at one point, but didn't like the issues caused by using up to 3 characters to represent each character in the path name. The last I checked, there were still some 256-character limits floating around in Windows (at least in the non-Unicode APIs). I haven't looked into the current solution--perhaps it deals with this in a way I didn't consider. Another approach would have been to provide replacements for certain Windows library functions that use native NT functions internally to get around the limitations. I believe the total list of needed replacements is: CopyFile CopyFileEx CreateDirectory CreateDirectoryEx CreateFile DeleteFile FindFirstFile FindFirstFileEx GetFileAttributes GetFileAttributesEx GetFullPathName GetLongPathName GetShortPathName GetBinaryType MoveFile MoveFileEx MoveFileWithProgress RemoveDirectory ReplaceFile SearchPath SetCurrentDirectory SetFileAttributes SetFileSecurity FindFirstChangeNotification Of course, this would have been an NT-specific solution. I actually use a version of such a library to create some of the otherwise-uncreatable files in a /dev directory (which is not on a managed mount). That way, I can do: $ ls /dev audio com3 kmem sda1 tty18 tty3 tty41 tty53 tty8 ttyS5 aux com4 lpt1 sr0 tty19 tty30 tty42 tty54 tty9 ttyS6 cdrom com5 lpt2 tty tty2 tty31 tty43 tty55 ttyS0 ttyS7 clipboard com6 lpt3 tty0 tty20 tty32 tty44 tty56 ttyS1 ttyS8 com1 com7 lpt4 tty1 tty21 tty33 tty45 tty57 ttyS10 ttyS9 com10 com8 mem tty10 tty22 tty34 tty46 tty58 ttyS11 ttym com11 com9 null tty11 tty23 tty35 tty47 tty59 ttyS12 urandom com12 con pipe tty12 tty24 tty36 tty48 tty6 ttyS13 windows com13 conin port tty13 tty25 tty37 tty49 tty60 ttyS14 zero com14 conout ptmx tty14 tty26 tty38 tty5 tty61 ttyS15 com15 console random tty15 tty27 tty39 tty50 tty62 ttyS2 com16 dsp scd0 tty16 tty28 tty4 tty51 tty63 ttyS3 com2 fifo sda tty17 tty29 tty40 tty52 tty7 ttyS4 gsw -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |