delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/06/13:02:47

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Date: Mon, 6 Jan 2003 13:02:41 -0500
From: Christopher Faylor <cgf AT redhat DOT com>
To: cygwin AT cygwin DOT com
Cc: law AT tlinx DOT org
Subject: Re: Repost, different list...File::Spec, cygwin, Syntactic vs. Semantic path analysis
Message-ID: <20030106180241.GL25858@redhat.com>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com, law AT tlinx DOT org
References: <20030106083008 DOT 4C1334385 AT sitemail DOT everyone DOT net> <001801c2b5ab$20576a30$1403a8c0 AT sc DOT tlinx DOT org>
Mime-Version: 1.0
In-Reply-To: <001801c2b5ab$20576a30$1403a8c0@sc.tlinx.org>
User-Agent: Mutt/1.5.1i

On Mon, Jan 06, 2003 at 09:43:30AM -0800, LA Walsh wrote:
>So it seems that 'syntactically', one can't always determine if a "/" is
>invalid in a straight win32 environment -- at least not when a network name
>is involved, but I'd agree it is pathological and should be ignored (and
>documented as ignored for pathological share names)

I am not clear on why we are devoting so much time to what is required
for a straight win32 environment in a cygwin mailing list.  As odd as it
sounds, this seems somewhat off-topic to me.  Or at least uninteresting.

>So I'd suggest the following:
>
>I. 
>Win32 syntactic normalization should always proceed to return "\".
>
>Cygwin is a Posix compatibility layer for Win32, though -- it isn't 
>supposed to be a complete replacement/invalidation of the underlying Win32
>layer -- unless one wants to declare that "e:foobar" only can reference a
>file and simulate "foobar\fee" as a valid file (through some mechanism).
>
>For cygwin to be a useful constructor of utils -- it should hand both Posix
>names *and* win32 names.  Normalization can return "/" for any filename that
>doesn't have, say, a <colon> in it -- but ... no... I agree it should always
>return "/" for _syntactic_ normalization....and *document* that "\" will be
>converted to / even if a remote fs allows "\" as a filename character.

You could take the radical approach of having a cygwin perl module
reject backslashes and colons entirely.  Whatever you do *please* do not
make the mistake of converting slashes to backslashes in anything that
is seen by cygwin functions.  If you convert backslashes to slashes then
you will be introducing an inconsistency between the way cygwin handles
these types of paths and the way the perl module interprets them.  Backslashes
and colons in paths short-circuit mount table operations in cygwin.  So,
\usr\bin is not equivalent to /usr/bin.

I'd like to ignore this tempest in a teapot entirely but I sure don't
want to see someone implement a perl module that does the wrong thing
for cygwin.

cgf

--
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/

- Raw text -


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