Subject: Re: Patch for path.cc & environ.cc
From: Carl Thompson <[email-masked]>
To: David Bolen <[email-masked]>
Cc: Cygwin List <[email-masked]>
Date: Mon, 12 Jun 2000 19:56:47 -0700

Thank you, your explanation cleared things up for me considerably.  I see
now that the number of cases that will have problems with this is much
smaller than I thought.

Carl Thompson

David Bolen wrote:
> 
> Carl Thompson [[email-masked]] writes:
> 
> > OK, switch HOME to something like GNOMOVISION_DIR.  Lot's of software does
> > that.  Or does Cygwin convert all paths found in the environment?
> 
> I'm not sure there would be a need, nor that even HOME would be a problem in
> the original example.
> 
> Let's say that GNOMOVISION_DIR was set to "C:\Program Files\Gnomovision",
> and then the code took that setting and added "/somedirectory/somefile" to
> it.  Now, there's no problem using mixed separators - that'll work fine.
> But because it has a \ in it, Cygwin will assume it's a window path and not
> use the mount settings.  But that's what you want in this case -
> GNOMOVISION_DIR _is_ a Windows path.  Conversely if it just had "/" then you
> can configure and treat it as a Cygwin path.
> 
> The same would even hold true for HOME - although with HOME, given that it's
> something that Unix utilities may depend on, is translated into a
> Cygwin/POSIX path, so that a typical Unix application wouldn't have to deal
> with any Window-isms in the setting (e.g., not expect to find backslashes
> there).
> 
> I think the only time the behavior may create issues is if you have a path
> using \, but which really wants to reference the Cygwin mount locations.
> But it seems somewhat strange that someone thinking of a Unix filesystem and
> Cygwin mounts would ever choose to use \.  That's not the same as saying an
> NT user with Cygwin apps never uses a path with a \ in it, only that when
> doing so, it's more likely the path really is a Windows path.
> 
> About the only real risk I can see is a Cygwin application using /
> consistently, but then getting user input (or configured input perhaps) for
> a suffix on a path that uses \, since that would change the specification.
> This is different than a full path (or prefix) since in that case treating
> the root of the path per-Windows would be fine.  But I'm not sure how Cygwin
> could reliably handle that case, and since the application in question would
> be Unix oriented (else why build with Cygwin) it should be expecting / from
> the user/config I expect.
> 
> -- David
> 
> /-----------------------------------------------------------------------\
>  \               David Bolen            \   E-mail: [email-masked]  /
>   |             FitLinxx, Inc.            \  Phone: (203) 708-5192    |
>  /  860 Canal Street, Stamford, CT  06902   \  Fax: (203) 316-5150     \
> \-----------------------------------------------------------------------/
> 
> --
> Want to unsubscribe from this list?
> Send a message to [email-masked]

--
Want to unsubscribe from this list?
Send a message to [email-masked]