Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <1DB8BA4BAC88D3118B2300508B5A552CD925C9@mail.fitlinxx.com> From: David Bolen To: cygwin AT sourceware DOT cygnus DOT com Subject: RE: Patch for path.cc & environ.cc Date: Mon, 12 Jun 2000 22:32:22 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" Carl Thompson [cet AT carlthompson DOT net] 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: db3l AT fitlinxx DOT com / | 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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com