This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygpath and partial normalization of trailing /.
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Poor Yorick <com dot cygwin dot cygwin at pooryorick dot com>, cygwin at cygwin dot com
- Date: Mon, 5 Oct 2015 17:21:31 +0300
- Subject: Re: cygpath and partial normalization of trailing /.
- Authentication-results: sourceware.org; auth=none
- References: <caaf01d0b0a80e077f56abed63864729 at webmail dot webfaction dot com>
- Reply-to: cygwin at cygwin dot com
Greetings, Poor Yorick!
> Currently, in a sh shell,
> cygpath 'c:\windows'
> returns
> /cygdrive/c/windows
> and
> cygpath 'c:\windows\.'
> returns
> /cygdrive/c/windows/
> . With the -m switch, the same pattern is followed, and in the case of
> a
> trailing, \. sequence, the dot is removed but the backslash is retained.
> This
> led to a bug (https://sourceforge.net/p/tkimg/bugs/84/) in a build
> process
> where the autoconf script looked something like this:
> TEA_ADD_INCLUDES([-I\"`\${CYGPATH} \${tkimg_SRC_PATH}`\"])
cygpath is not a normalization tool. Use readlink, if you need normalized
paths.
> Because of the trailing backslash in the output of cygpath, the final
> double
> quote ended up getting escaped.
> Rather than normalizing half of it away and leaving half of it, Wouldn't
> it be
> better to either not normalize the trailing slash-dot sequence at all,
> or to
> completely normalize it away? If that which is delimited is removed, it
> would
> seem to make sense to removed the delimiter as well.
> The case that the incoming pathname already has a trailing delimiter is
> one
> that I think is already recognized and differentiated.
--
With best regards,
Andrey Repin
Monday, October 5, 2015 17:20:20
Sorry for my terrible english...
--
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