public inbox for cygwin-talk@cygwin.com
 help / color / mirror / Atom feed
* RE: Handling special characters (\/:*?"<>|) gracefully
@ 2006-05-24 22:07 Williams, Gerald S (Jerry)
  0 siblings, 0 replies; 4+ messages in thread
From: Williams, Gerald S (Jerry) @ 2006-05-24 22:07 UTC (permalink / raw)
  To: Thread TITTTL'd!

Brian Dessent wrote:
> As I understand it, the win32 API preserves case but is not case
> sensitive.  The native API is both, so in theory an application that
> used only native calls could cope with both README and Readme, but no
> win32 app could.  So, from the standpoint of Cygwin this is pretty
> useless as A) it would take significant code rewrites to use
> the native API everywhere (not to mention backcompat hell for 9x/ME)
> and B) it would lead to the situation (which we briefly got a taste
> of somewhere in a past 1.5.x release) where Cygwin was able to create
> files that could not be deleted by Explorer or any other regular
> Windows app.

I don't want to gum up the main list with this discussion...

If you wanted to make such a change in Cygwin, you wouldn't
retarget the native API, rather, you'd retarget replacements
for the 24 (or so) functions in the Win32 API that stop you
from using native naming (these would also handle backward
compatibility). I know I'm just being pedantic here, since
Cygwin already took a different route, but such a thing is
feasible--I looked into it pretty closely at one time.

Yes, it's interesting creating files that Windows utilities
can't touch (e.g., "con"). And if they try to access either
of "hello" and "Hello" they'll only get one (they can still
delete both, one at a time). I'd call these "stupid Windows
tricks" but I'm sure there's some form of redundancy in that
expression.

On the other hand, files named "cyg%4D%49%4E%47" aren't
all that amenable to manipulation via Windows utilities
either, so to some degree it's a matter of perspective.

gsw

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Handling special characters (\/:*?"<>|) gracefully
  2006-05-24 12:18   ` Brian Dessent
@ 2006-05-24 12:28     ` Dave Korn
  0 siblings, 0 replies; 4+ messages in thread
From: Dave Korn @ 2006-05-24 12:28 UTC (permalink / raw)
  To: 'discontinuity in the space-time continuum'

On 24 May 2006 11:46, Brian Dessent wrote:

> Dave Korn wrote:
> 
>>   Well, the /real/ problem about those files (which matched DOS special
>> device names) was that you couldn't remove them from cygwin either; not
>> being able to delete them from the very same command shell where you
>> created them is far worse than having to use the same tool to delete
>> something that you used to create it.
> 
> You can create and delete them fine from Cygwin using the native path
> (touch '//?/c:/nul') but that wasn't very intuitive.
> 
> Brian


  IIRC, it wasn't just that, but that you could create them by doing "touch
nul" but couldn't then remove them with "rm nul", albeit that the long syntax
still worked.


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Handling special characters (\/:*?"<>|) gracefully
  2006-05-24 10:05 ` Dave Korn
@ 2006-05-24 12:18   ` Brian Dessent
  2006-05-24 12:28     ` Dave Korn
  0 siblings, 1 reply; 4+ messages in thread
From: Brian Dessent @ 2006-05-24 12:18 UTC (permalink / raw)
  To: The Cygwin-Talk Maiming List

Dave Korn wrote:

>   Well, the /real/ problem about those files (which matched DOS special device
> names) was that you couldn't remove them from cygwin either; not being able to
> delete them from the very same command shell where you created them is far
> worse than having to use the same tool to delete something that you used to
> create it.

You can create and delete them fine from Cygwin using the native path
(touch '//?/c:/nul') but that wasn't very intuitive.

Brian

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Handling special characters (\/:*?"<>|) gracefully
       [not found] <447420E3.5B3609B3@dessent.net>
@ 2006-05-24 10:05 ` Dave Korn
  2006-05-24 12:18   ` Brian Dessent
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Korn @ 2006-05-24 10:05 UTC (permalink / raw)
  To: Thread TITTTL'd!

On 24 May 2006 10:01, Brian Dessent wrote:

> 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.)
> 
> As I understand it, the win32 API preserves case but is not case
> sensitive.  The native API is both, so in theory an application that
> used only native calls could cope with both README and Readme, but no
> win32 app could.  

  Not so.  See MSDN://CreateFile/FILE_FLAG_POSIX_SEMANTICS.  The actual
requirement is "NTFS not FAT" rather than "Native API not Win32 API".

> So, from the standpoint of Cygwin this is pretty
> useless as A) it would take significant code rewrites to use the native
> API everywhere (not to mention backcompat hell for 9x/ME) and B) it
> would lead to the situation (which we briefly got a taste of somewhere
> in a past 1.5.x release) where Cygwin was able to create files that
> could not be deleted by Explorer or any other regular Windows app.

  Well, the /real/ problem about those files (which matched DOS special device
names) was that you couldn't remove them from cygwin either; not being able to
delete them from the very same command shell where you created them is far
worse than having to use the same tool to delete something that you used to
create it.  


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-24 22:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-24 22:07 Handling special characters (\/:*?"<>|) gracefully Williams, Gerald S (Jerry)
     [not found] <447420E3.5B3609B3@dessent.net>
2006-05-24 10:05 ` Dave Korn
2006-05-24 12:18   ` Brian Dessent
2006-05-24 12:28     ` Dave Korn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).