Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 12 Mar 2003 18:18:32 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: anton AT mips DOT complang DOT tuwien DOT ac DOT at cc: cygwin AT cygwin DOT com Subject: Re: Mixing / and \ path separators In-Reply-To: <200303122242.XAA26903@a0.complang.tuwien.ac.at> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Wed, 12 Mar 2003, Anton Ertl wrote: > Igor Pechtchanski wrote: > > > > On Wed, 12 Mar 2003, Anton Ertl wrote: > > > > > Cygwin 1.3.18(0.69/3/2) handles filenames like > > > > > > /usr/local/share/gforth/0.5.9-20030201\kernl32l.fi > > > > > > all right, where the "\" is meant as a path separator. Cygwin > > > 1.3.19(0.71/3/2) and 1.3.20 reportedly do not like such names (file > > > not found). Is this intentional and will it stay that way? > > > > This is intentional. See , > > especially the line that says: > > - Make handling of \foo\bar equivalent to /foo\bar. (Christopher Faylor) > > (the above should be the other way around, but you get the idea). > > Thanks (No, I don't get the idea, but I trust you:-). Nice to be trusted... :-) Still, the above should have been - Make handling of /foo\bar equivalent to \foo\bar. (Christopher Faylor) This means that any path with a \ will be treated as a Windows path (off the current drive). > > > If so, how should I deal with path names where parts of the path come > > > from ordinary windows users? > > > > Translate them to Unix paths using, for example, "sed 's!\\!/!g'. > > Ok. Can we leave the drive letters in place, or do we need to > translate them, too (into /cygdrive/..., right)? I.e., is > "c:/this/that" ok? In 1.3.18 it is. You should be able to use Windows paths as-is even now. What I meant were corner cases, e.g., /foo\bar now means c:\foo\bar, and not /foo/bar (as it did in pre-1.3.19). > > Does the windows port of Gforth know about POSIX paths? > > Yes. It treats both '/' and '\' as path separators, but that's easy > to change. > > - anton You can keep '\' as a separator, as long as you're aware that under Cygwin, \foo != /foo. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk! -- /usr/games/fortune -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/