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: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 AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 To: cygwin AT cygwin DOT com Subject: cygpath and partial normalization of trailing /. Message-ID: X-Sender: com DOT cygwin DOT cygwin AT pooryorick DOT 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