delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/21/23:35:11

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Tue, 21 Jan 2003 23:35:01 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Kenji Yamashita <yamashita_kenji1972 AT yahoo DOT co DOT jp>
cc: cygwin AT cygwin DOT com
Subject: Re: strange behavior of cygpath
In-Reply-To: <20030122.132150.65744170.yamashita_kenji1972@yahoo.co.jp>
Message-ID: <Pine.GSO.4.44.0301212329230.13905-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

On Wed, 22 Jan 2003, Kenji Yamashita wrote:

> Hello,
>
> I found that the behavior of cygpath was strange.
>
>   kenji AT ibm[88] cygcheck -c cygwin
>   Cygwin Package Information
>   Package             Version
>   cygwin              1.3.18-1
>
>   Use -h to see help about each section
>   kenji AT ibm[89] cygpath -pw 'c:\'
>   c;c:\
>
> In cygwin-1.3.14-1, the behavior of cygpath is the following.
>
>   kenji AT ibm[93] tar jxf cygwin-1.3.14-1.tar.bz2 usr/bin/cygpath.exe
>   kenji AT ibm[94] usr/bin/cygpath.exe -pw 'c:\'
>   c:\
>
> Since cygwin-1.3.15-2, the behavior of cygpath has changed.
>
>   kenji AT ibm[95] tar jxf cygwin-1.3.15-2.tar.bz2 usr/bin/cygpath.exe
>   kenji AT ibm[96] usr/bin/cygpath.exe -pw 'c:\'
>   c;c:\
>
> In the announcement of cygwin-1.3.15-1,
>   - Fix for "cygpath -w -l returning garbage".
>     (see http://cygwin.com/ml/cygwin/2002-09/msg00749.html )
>     (Christopher Faylor)
>
> Is it related with? and the above is the specification of cygpath?
>
> Regards,
> Kenji Yamashita

Kenji,

Let me make sure I understand what you're trying to do:
You're trying to translate a *Windows* path to a Windows path using
cygpath?

The '-p' flag tells cygpath that the path it's translating is in the form
of Unix $PATH (i.e., directories/files separated by *colons*).  Thus, it's
trying to translate the 2 component Unix path, 'c' followed by '\', into a
Windows %PATH%-style list (directories/files separated by semicolons).
This is correct behavior, and exactly what you're seeing in 1.3.15.  Any
other output is erroneous, and should be treated as such.  1.3.14 cygpath
apparently had a bug.  It's quite possible that the change you mentioned
had the additional benefit of fixing this bug.
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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