X-Recipient: archive-cygwin@delorie.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:mime-version:content-type
	:content-transfer-encoding:date:from:to:subject:message-id; q=
	dns; s=default; b=MMCWzvG36YBRZb/YiUge1evBtpdsUsdZTFkY92W5Z5zxq7
	ZmzOW6oOQx9Y37u76M8FEh2ZFwkxrVzrNk1qoFQmB5wAC9qBHZFWoe3gzeFjxWYV
	uGWdMFvbbaBh5EPw6YcxNrsx/eIxUP7OaLAMorb6j5378pSA3IX72gKf4PPiA=
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:mime-version:content-type
	:content-transfer-encoding:date:from:to:subject:message-id; s=
	default; bh=u0tEiw6Z7NBfF0+STB6+vjNyw6w=; b=gZHT/1xkqYGkN24CvWy0
	cA9HisrMIrfHpiFKPNXS1CI5HF5JtEZmClANB2L2lNeDjElEZV27AS7L4EDyQkEk
	nyD5qZcwckIsBb7mXMEUiJWUNCEoVuK31Iy0CNkcHDw5EeIY4GBd3ziM9DE+KbDW
	BBs1FJTpiTSAtiU8h55synQ=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=2.5 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2
X-HELO: smtp.webfaction.com
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII; format=flowed
Content-Transfer-Encoding: 7bit
Date: Mon, 05 Oct 2015 06:29:37 -0600
From: Poor Yorick <com.cygwin.cygwin@pooryorick.com>
To: cygwin@cygwin.com
Subject: cygpath and partial normalization of trailing /.
Message-ID: <caaf01d0b0a80e077f56abed63864729@webmail.webfaction.com>
X-Sender: com.cygwin.cygwin@pooryorick.com
User-Agent: Roundcube Webmail/1.1.2
X-IsSubscribed: yes

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}`\"])

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.

-- 
Poor Yorick


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

