delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2013/09/18/10:34:35

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=JwmfHdeJEM94C0bzjTY23EDogJ0Ch
YIzbU8rlHc9aSTOfsqb2LeTKSsBuGgyKv4PkPeBZFlY5KFaBD/6YJDdMsKylPFwa
nIHUPvyEhgLJd/6X0tnVXLTiH1LStdMsuFaT9FWrsnARp9x0SR/sLONyJADTSTMG
0xOb3BXZ7JgmeI=
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=Cw2wnY0dEZOoN0TYF7Q6CDqhYzQ=; b=rTR
Ncs8mARGJLHhQw3j2Raf6Ne8QRk1YGTzoB/glpOTkwiZsG5DjVbfqDB4d69+n/58
HJD4OEL6y7AC5Ymh1ZWiCbvS6VVzM9ApDVGFl+c+fi8qb5+qw7Bu+WZI8Wkte8ir
EOQCfCUynSsqwVfxeVH39SvgFCJ0hDhPMryoaOBA=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
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=1.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,NO_RELAYS autolearn=ham version=3.3.2
X-HELO: mail-ie0-f174.google.com
MIME-Version: 1.0
X-Received: by 10.50.70.42 with SMTP id j10mr3331729igu.44.1379514859235; Wed, 18 Sep 2013 07:34:19 -0700 (PDT)
Date: Wed, 18 Sep 2013 15:34:19 +0100
Message-ID: <CAF+hkWpba76MxiLzbcfUD=bHs=N=Xbti7vN4qLw7H2BWtWYQYw@mail.gmail.com>
Subject: Re: cygpath -m behaviour change
From: David Griffiths <david DOT griffiths AT gmail DOT com>
To: cygwin AT cygwin DOT com

Hi, the script is attempting to determine the directory in which it
exists, so CURRENT_DIR is a bit misleading. This is so that it can
access other files in the same package relative to it (quite a common
technique I think).

Might be helpful to have some examples:

/home/dgriff> mkdir test
/home/dgriff> cd test
/home/dgriff/test> cygpath -m "file\.."
./
/home/dgriff/test> cygpath -m "file/.."
cygpath: error converting "file/.." - No such file or directory
/home/dgriff/test> cygpath -m "file\..\.."
C:/cygwin/home/dgriff/
/home/dgriff/test> cygpath -m "file/../.."
cygpath: error converting "file/../.." - No such file or directory
/home/dgriff/test> touch file
/home/dgriff/test> cygpath -m "file/../.."
cygpath: error converting "file/../.." - No such file or directory
/home/dgriff/test> cygpath -m "file\..\.."
C:/cygwin/home/dgriff/
/home/dgriff/test> mkdir dir
/home/dgriff/test> cygpath -m "dir/../.."
C:/cygwin/home/dgriff/

Note that the backslash variant always works and all of these used to
work under previous levels of 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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019