delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/05/14:21:00

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <19990505182318.24854.rocketmail@web114.yahoomail.com>
Date: Wed, 5 May 1999 11:23:18 -0700 (PDT)
From: Earnie Boyd <earnie_boyd AT yahoo DOT com>
Reply-To: earnie_boyd AT yahoo DOT com
Subject: Re: Cygwin compatibility Questions
To: flawlor AT us DOT ibm DOT com
Cc: cygwin users <cygwin AT sourceware DOT cygnus DOT com>
MIME-Version: 1.0

--- flawlor AT us DOT ibm DOT com wrote:
> 
> 
> Thanks a lot for the quick response.
> 
> I did a little more testing and the problem wasn't exactly what I first
> thought,
> but let me give you a couple commands that illustrate it a little more
> clearly.
> I checked that I was correctly invoking the cygwin pwd command.
> 
>    set -x
>    oldpath=`pwd`
>    cd E:/temp
>    epath=`pwd`
> 
> Cygwin is installed on my C: drive and the bash shell starts off in
> C:/WINNT/Profiles/flawlor/Desktop.
> 
> The result of the above script yields:
> 
>   oldpath=/WINNT/Profiles/flawlor/Desktop
>   epath=//E/temp
> 

Well, that is the way it works now.  In the snapshots and the next release B21
epath will map to /cygpath/e/temp just to give you a heads up.

This has to do with the mapping and remapping of the filesystem paths.


> It seems that whenever I am on my 'home' disk, there is no drive letter
> returned by pwd.
> This seems fine within the script as a cd to a path without a drive letter
> assumes the 'home' drive.
> 
> The problem comes, for example, when I try to pass these paths to executables
> which are running on a different drive.  They make the assumption
> that it is a path on their current drive and cannot find it if they are not
> running from the 'home' drive, e.g.,
> 
>    E:/temp/somefunc.exe -f ${oldpath}/thedata
> 
> fails because $oldpath doesn't have any drive letter and 'somefunc'
> is trying to find it on the E: drive.
> 

Only if somefunc.exe is a non-cygwin program.  cygwin built program a cygwin
path aware and would work as you would like them too.

> This seems inconsistent that pwd doesn't always return a path with
> the drive letter.  Any pwd command my scripts issue might or might
> not return a drive letter.

Suggestion:  create your own pwd so that it always returns the the full win32
path.  See the cygwin api docmentation.
===
"Earnie Boyd" <mailto:earnie_boyd AT yahoo DOT com>
CYGWIN RELATED HELP:
 DOCUMENTATION: <http://sourceware.cygnus.com/cygwin/docs.html>
       DLLHELP: <http://www.xraylith.wisc.edu/~khan/software/gnu-win32/>
ARCHIVE SEARCH: <http://www.delorie.com/archives/> OR
                <http://www.eGroups.com/list/gnu-win32/>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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