This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: chere + mintty doesn't work with mapped drives
- From: Dave Kilroy <kilroyd at googlemail dot com>
- To: cygwin at cygwin dot com
- Cc: charles dot butterfield at nextcentury dot com
- Date: Mon, 02 Dec 2013 19:13:44 +0000
- Subject: Re: chere + mintty doesn't work with mapped drives
- Authentication-results: sourceware.org; auth=none
- References: <00ce27600b2e404cbb8f9e56c3994e8c at CO2PR07MB556 dot namprd07 dot prod dot outlook dot com> <e438b5ebbe69401b843342394f5a5ea9 at CO2PR07MB556 dot namprd07 dot prod dot outlook dot com> <5299A4BF dot 8070201 at gmail dot com> <e25e9576d2a2415ea90019117708d9d5 at CO2PR07MB556 dot namprd07 dot prod dot outlook dot com> <529B529F dot 7080608 at googlemail dot com> <9ce71b17ad604e5c943e3c3731b145d1 at CO2PR07MB556 dot namprd07 dot prod dot outlook dot com> <20131201210920 dot GA11800 at calimero dot vinschen dot de>
On 01/12/2013 21:09, Corinna Vinschen wrote:
On Dec 1 15:48, Charles Butterfield wrote:
-----Original Message-----
From: David Kilroy [mailto:kilroyd@googlemail.com]
Can you run the following commands from mintty running bash vs cmd
running bash:
cygpath -u "y:\apps"
test -d /cygdrive/y/apps
echo $?
Result of the first command should be /cygdrive/y/apps 2nd command
shouldn't output anything Result of 3rd command should be 0 (true)
Dave.
Results from MINTTY+BASH:
----------------------------------
$ cygpath -u "y:\apps"
/cygdrive/y/apps
$ test -d /cygdrive/y/apps
$ echo $?
1
Results from CMD+BASH
------------------------------
$ cygpath -u "y:\apps"
/cygdrive/y/apps
$ test -d /cygdrive/y/apps
$ echo $?
0
Are you starting mintty with "run as administrator" by any chance?
Corrina's right - check that the same user is being used in both cases.
I don't think this would explain why it's not working from the context
menus though. Finding out why bash under mintty doesn't think
/cygdrive/y/apps is a directory is the key.
Workaround: if you change everything in the if [ ! -z "$2" ] test in
xhere to the snippet below, chere will attempt to change to the
directory (but may fail)
Regards,
Dave.
if [ ! -z "$2" ]; then
CHERE_DIR=`$CYGPATH "$2"`
NETWORK_PATH=/$CHERE_DIR
if [ -d "$CHERE_DIR" ]; then
cd "$CHERE_DIR"
# If the full path doesn't exist, this is prob a network path
elif [ -d "$NETWORK_PATH" ]; then
cd "$NETWORK_PATH"
# Not a directory? Take a guess...
else
cd "$CHERE_DIR"
fi
fi
--
Problem reports: http://cygwin.com/problems.html
FAQ: http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple