From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: cygpath 1.7.18 problem. cypath returns mangled filename
Date: Wed, 26 Jun 2013 14:53:00 -0000 [thread overview]
Message-ID: <20130626131038.GB6966@calimero.vinschen.de> (raw)
In-Reply-To: <069901ce724c$a4232250$ec6966f0$@dyalog.com>
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
prev parent reply other threads:[~2013-06-26 13:10 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 9:19 John Daintree
2013-06-26 14:53 ` Corinna Vinschen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130626131038.GB6966@calimero.vinschen.de \
--to=corinna-cygwin@cygwin.com \
--cc=cygwin@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).