From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12318 invoked by alias); 5 Oct 2015 12:29:40 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 12269 invoked by uid 89); 5 Oct 2015 12:29:40 -0000 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 Received: from mail6.webfaction.com (HELO smtp.webfaction.com) (74.55.86.74) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 05 Oct 2015 12:29:39 +0000 Received: from webmail.webfaction.com (wf5.webfaction.com [75.126.149.3]) by smtp.webfaction.com (Postfix) with ESMTP id E571E2078575 for ; Mon, 5 Oct 2015 12:29:37 +0000 (UTC) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Mon, 05 Oct 2015 12:29:00 -0000 From: Poor Yorick To: cygwin@cygwin.com Subject: cygpath and partial normalization of trailing /. Message-ID: X-Sender: com.cygwin.cygwin@pooryorick.com User-Agent: Roundcube Webmail/1.1.2 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00048.txt.bz2 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