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:date:message-id:subject:from:to :content-type; q=dns; s=default; b=K+vC+QnfjCGv6BEe6ZxpfoFrMmhfB mii8GdN2r4Wgz8LbApRYg6w8yOehaZaBMi2R5wZdpp2Ni99J0cBMoWOYxsXIcR6I I7iv0JzzakKf0GHU/8wuKVd+09ipwJq9R3m3I0NWOrrE9A3jqiHOYjzLDmF6nwP0 1mN20g+prAv7kc= 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:date:message-id:subject:from:to :content-type; s=default; bh=ZmpxZWUWC334sqUi5U/rphxjXa0=; b=XvV 7JU5id542xALVETUBqqdycnErQZn4gqwVtE24rioaFmEJ8hBQefehy0Qt8pqYYXI Br8LxXMf2127q1fS3jghDgYhkFdyJ5Vov3r3USmFSbDIcMu0ai0ue8Ykm3/zYAj5 XoDFkLUBjoxJl1rqnk0EczjFGjGMMWvzoQ32sWhU= 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=0.8 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,NO_RELAYS autolearn=ham version=3.3.2 X-HELO: mail-ie0-f171.google.com MIME-Version: 1.0 X-Received: by 10.50.23.16 with SMTP id i16mr1108961igf.50.1379597002736; Thu, 19 Sep 2013 06:23:22 -0700 (PDT) Date: Thu, 19 Sep 2013 14:23:22 +0100 Message-ID: Subject: Re: cygpath -m behaviour change From: David Griffiths To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 > But why are you even using cygpath to try and determine the containing > directory? 'dirname' does that task, in a much more portable manner, > and without having to worry about whether 'file/..' can be abused in > spite of POSIX semantics To given even more context, this is how it was used: uname=`uname` case $uname in CYGWIN_*) CURRENT_DIR=$(cygpath -ma "${0}\..") ;; *) CURRENT_DIR=$(cd $(dirname "$0") && pwd) esac CURRENT_DIR (or something derived from it) ends up getting passed to a Java program which requires the absolute pathname in native format. The dirname/pwd variant won't do that under cygwin. Cheers, Dave -- 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