delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/27/08:11:13

X-Recipient: archive-cygwin AT delorie DOT com
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
MIME-Version: 1.0
In-Reply-To: <CAO1jNwv-TEEZfLTvtZxdQ3oa9k+KsHMaM8v6sLx-TZxN73OumA@mail.gmail.com>
References: <CAO1jNwv-TEEZfLTvtZxdQ3oa9k+KsHMaM8v6sLx-TZxN73OumA AT mail DOT gmail DOT com>
Date: Wed, 27 Jun 2012 08:10:44 -0400
Message-ID: <CA+sc5mmhidv4O=ASd=Azu_X1Aarg977QnQOJ+uejAvo5AFkN+A@mail.gmail.com>
Subject: Re: cygwin_conv_path strange behavior
From: Earnie Boyd <earnie AT users DOT sourceforge DOT net>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q5RCB9Ah019940

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.

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019