From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19272 invoked by alias); 27 Jun 2012 12:29:51 -0000 Received: (qmail 19262 invoked by uid 22791); 27 Jun 2012 12:29:48 -0000 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 Received: from mail-we0-f171.google.com (HELO mail-we0-f171.google.com) (74.125.82.171) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jun 2012 12:29:35 +0000 Received: by wejx9 with SMTP id x9so738680wej.2 for ; Wed, 27 Jun 2012 05:29:34 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.132.94 with SMTP id n72mr10433425wei.60.1340800174732; Wed, 27 Jun 2012 05:29:34 -0700 (PDT) Received: by 10.227.97.36 with HTTP; Wed, 27 Jun 2012 05:29:34 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Jun 2012 12:29:00 -0000 Message-ID: Subject: Re: cygwin_conv_path strange behavior From: Jan Nijtmans To: cygwin@cygwin.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00508.txt.bz2 2012/6/27 Earnie Boyd : > 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: >> =A0 =A0$ ./mypath >> =A0 =A0win32 path: C:\some\path\foo\mypath.exe >> =A0 =A0posix path: /cygdrive/c/some/path/foo/mypath.exe >> From a win32 command shell: >> =A0 =A0> .\mypath >> =A0 =A0win32 path: C:\some\path\foo\mypath.exe >> =A0 =A0posix path: /foo/mypath.exe >> > > This sounds it is as expected. =A0You 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. =A0However, 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