delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/06/26/09:11:02

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:content-transfer-encoding
:in-reply-to; q=dns; s=default; b=oONn+WnFBdX3hqnp/mWFueKn9JgvqN
7h0mpo3t7qK+ZHjwf91QVNJRDU06EZUny2x5fzMbIU3toXrvqj0CXnzEqNqQv2bo
/gaMdXnEbUlnD+tANnJn7kv/Bz4RNLxNWTS+3Y1/cAvnYC1G9jp6xrNNkD2ZMHDI
NEc8fFwjhPwec=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:content-transfer-encoding
:in-reply-to; s=default; bh=Ge8t6jkL0CSHuicHdVilY7Lk830=; b=ppXM
BmBHtyQblgL5MuN7z33I7S2JjwK2UVmR2l9WpGU/UUsPSWNDdShRQAoCIKtdJ0HM
ftbMENtM6qFA/TdYawFKQgH78rWeHlFTgT2yAM1DFviFJlYdQxQdHQ8iosYnOrru
MofRGPoCsb3BWORVDLgZKMaCx58ZkwvdLfQ7f+M=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,TW_YG autolearn=ham version=3.3.1
Date: Wed, 26 Jun 2013 15:10:38 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: cygpath 1.7.18 problem. cypath returns mangled filename
Message-ID: <20130626131038.GB6966@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <069901ce724c$a4232250$ec6966f0$@dyalog.com>
MIME-Version: 1.0
In-Reply-To: <069901ce724c$a4232250$ec6966f0$@dyalog.com>
User-Agent: Mutt/1.5.21 (2010-09-15)

On Jun 26 10:07, John Daintree wrote:
> Hi,
> 
> I’ve hit a problem with cygpath. Here’s a script:
> 
> JD0=/cygdrive/d/obj/13.2.tmp/apl/win/32/unicode/winapi/dev/opt
> JD=/cygdrive/c/src/13.2.dss/svn/misc/samples/tmp
> 
> cygpath --version
> 
> echo ......
> echo $(cygpath -up "$JD0:$JD:$JD:$JD")
> echo ......
> echo $(cygpath -up "$JD0:$JD:$JD:$JD:$JD:$JD")
> echo ......
> 
> 
> Here’s its output :
> 
> cygpath (cygwin) 1.7.18
> Path Conversion Utility
> Copyright (C) 1998 - 2013 Red Hat, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> ......
> /cygdrive/d/obj/13.2.tmp/apl/win/32/unicode/winapi/dev/opt:/cygdrive/c/src/1
> 3.2.dss/svn/misc/samples/tmp:/cygdrive/c/src/13.2.dss/svn/misc/samples/tmp:/
> cygdrive/c/src/13.2.dss/svn/misc/samples/tmp
> ......
> /cygdrive/c/ygdrive/d/obj/13.2.tmp/apl/win/32/unicode/winapi/dev/opt:/cygdri
> ve/c/src/13.2.dss/svn/misc/samples/tmp:/cygdrive/c/src/13.2.dss/svn/misc/sam
> ples/tmp:/cygdrive/c/src/13.2.dss/svn/misc/samples/tmp:/cygdrive/c/src/13.2.
> dss/svn/misc/samples/tmp:/cygdrive/c/src/13.2.dss/svn/misc/samples/tmp
> ......
> Note that the second call to cygpath has “mangled” the first element of the
> returned path. The only difference between that 1st and 2nd calls to cygpath
> is the length of the argument.
> Note that changing  the separator from : to \; doesn’t help – it still
> mangles the return.

PEBCAK.  You're not supposed to put UNIX paths into the function when
using the -u flag.  The path is inspected and potentially mangled on the
assumption that this is a Windows path.  This is necessary to support
Windows paths of more than 260 chars.

Having said that, I changed the behaviour of cygpath so that mangling
is not performed when using the -p option since the mangling only
works on single paths anyway.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat

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