This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: chere + mintty doesn't work with mapped drives
- From: David Kilroy <kilroyd at googlemail dot com>
- To: Charles Butterfield <charles dot butterfield at nextcentury dot com>
- Cc: "cygwin at cygwin dot com" <cygwin at cygwin dot com>
- Date: Sun, 01 Dec 2013 15:15:43 +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>
On 30/11/13 18:29, Charles Butterfield wrote:
-----Original Message-----
From: Dave Kilroy [mailto:kilroyd@googlemail.com]
The xhere script should pass y:\apps to cygpath to get the cygwin path, which
should be /cygdrive/y/apps. IIRC /cygdrive/y may not be visible via ls, but it
should be usable. I'm guessing the path is failing the directory test... in which
case adding a trailing else to always cd $CHERE_DIR would fix things for you
I think I've narrowed down the problem to the terminal emulator.
First - I did try modifying xhere to do a "cd $CHERE_DIR" (and then $NETWORK_PATH)
but neither variable worked.
I then noticed that if I start bash from a cmd.exe emulator (and adjust the path to
Include /bin), that I can see (and cd to) a mapped drive. But I cannot "see" (via ls)
the mapped drive when using mintty.
From cmd.exe+bash: (Y: is the mapped drive)
--------------------------------------------------------
$ ls -l /cygdrive/
total 16
d---------+ 1 TrustedInstaller TrustedInstaller 0 Nov 30 11:37 c/
drwx------+ 1 SYSTEM SYSTEM 0 Nov 30 11:37 e/
drwx------+ 1 SYSTEM SYSTEM 0 Nov 30 11:37 g/
drwxrwxrwx 1 ???????? ???????? 0 Feb 2 2013 y/
cb@hpc15 /usr/bin
$ cd /cygdrive/y
cb@hpc15 /cygdrive/y
$ ls
Archive Photos
Audio RECYCLER
Backups Reunion 2006 Photos
...
From mintty+bash: (Y: is the mapped drive)
--------------------------------------------------------
cb@hpc15 ~
$ ls -l /cygdrive/
total 16
d---------+ 1 TrustedInstaller TrustedInstaller 0 Nov 30 11:37 c
drwx------+ 1 SYSTEM SYSTEM 0 Nov 30 11:37 e
drwx------+ 1 SYSTEM SYSTEM 0 Nov 30 11:37 g
cb@hpc15 ~
$ cd /cygdrive/y
-bash: cd: /cygdrive/y: No such file or directory
cb@hpc15 ~
I suspect that whatever is going on that affects "ls" and "cd" is also
affecting chere/xhere.
Not sure what the next step should be.
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.
--
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