From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9492 invoked by alias); 27 Jun 2012 12:11:00 -0000 Received: (qmail 9464 invoked by uid 22791); 27 Jun 2012 12:10:57 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pz0-f43.google.com (HELO mail-pz0-f43.google.com) (209.85.210.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 27 Jun 2012 12:10:44 +0000 Received: by dajz8 with SMTP id z8so1277184daj.2 for ; Wed, 27 Jun 2012 05:10:44 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.231.229 with SMTP id tj5mr63338812pbc.39.1340799044273; Wed, 27 Jun 2012 05:10:44 -0700 (PDT) Received: by 10.66.82.6 with HTTP; Wed, 27 Jun 2012 05:10:44 -0700 (PDT) In-Reply-To: References: Date: Wed, 27 Jun 2012 12:11:00 -0000 Message-ID: Subject: Re: cygwin_conv_path strange behavior From: Earnie Boyd To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 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/msg00506.txt.bz2 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: > =C2=A0 =C2=A0$ ./mypath > =C2=A0 =C2=A0win32 path: C:\some\path\foo\mypath.exe > =C2=A0 =C2=A0posix path: /cygdrive/c/some/path/foo/mypath.exe > From a win32 command shell: > =C2=A0 =C2=A0> .\mypath > =C2=A0 =C2=A0win32 path: C:\some\path\foo\mypath.exe > =C2=A0 =C2=A0posix 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. --=20 Earnie -- https://sites.google.com/site/earnieboyd -- 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