X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CA+sc5mmhidv4O=ASd=Azu_X1Aarg977QnQOJ+uejAvo5AFkN+A@mail.gmail.com>
References: <CAO1jNwv-TEEZfLTvtZxdQ3oa9k+KsHMaM8v6sLx-TZxN73OumA@mail.gmail.com>	<CA+sc5mmhidv4O=ASd=Azu_X1Aarg977QnQOJ+uejAvo5AFkN+A@mail.gmail.com>
Date: Wed, 27 Jun 2012 14:29:34 +0200
Message-ID: <CAO1jNwvuNJkBmmibcE8DoyOs285FSVOUAavg9_AAHNvpDxT-wA@mail.gmail.com>
Subject: Re: cygwin_conv_path strange behavior
From: Jan Nijtmans <jan.nijtmans@gmail.com>
To: cygwin@cygwin.com
Content-Type: text/plain; charset=ISO-8859-1
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q5RCTw70021177

2012/6/27 Earnie Boyd <earnie@users.sourceforge.net>:
> On Wed, Jun 27, 2012 at 7:59 AM, Jan Nijtmans wrote:
>>
>> Now, copy cygwin1.dll to the same directory
>> as mypath.exe, and do the same
>> from a cygwin shell, it prints:
>>    $ ./mypath
>>    win32 path: C:\some\path\foo\mypath.exe
>>    posix path: /cygdrive/c/some/path/foo/mypath.exe
>> From a win32 command shell:
>>    > .\mypath
>>    win32 path: C:\some\path\foo\mypath.exe
>>    posix path: /foo/mypath.exe
>>
>
> This sounds it is as expected.  You copied only cygwin1.dll so the
> shell you started had a cygwin1.dll in another directory so that / is
> mapped to the parent directory containing the cygwin1.dll the shell is
> using.  However, when you use the win32 command shell there is no
> previous mapping of / to the parent directory containing cygwin1.dll
> so / is mapped to c:/some/path and the function correctly reports
> /foo/mypath.exe.

OK, so cygwin1.dll always maps "/" to its parent directory, if no other
mapping can be found. But from a win32 command shell, I don't
need such a mapping, I just want to know the full path
where the executable is. How can I influence that?

Thanks!

Regards,
            Jan Nijtmans

--
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


