delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/12/12/05:16:18

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Date: Wed, 12 Dec 2007 11:15:41 +0100
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: get cygpath to leave relative paths as relative?
Message-ID: <20071212101541.GU6618@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <678518 DOT 3115 DOT qm AT web53803 DOT mail DOT re2 DOT yahoo DOT com>
MIME-Version: 1.0
In-Reply-To: <678518.3115.qm@web53803.mail.re2.yahoo.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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

On Dec 11 21:25, Brent wrote:
> Corinna wrote:
> 
> >This is not always possible when converting POSIX paths to Win32 paths
> >for a couple of reasons.  One reason is that a relative path might
> >contain symlinks, another one is that a path containing .. could cross
> >mount points.  To recognize both cases extra processing is necessary
> >which might convert the path to an absolute form.
> 
> Thanks for responding.
> 
> You use qualifiers like "not always possible" and "might".  Does that imply that cygpath CAN leave relative paths as relative under certain circumstances?

If you use "..", no.

> What I am seeing is that it always converts relative paths to absolute
> paths, even in cases that are outside the scenarios that you mention.

$ cygpath -w src/gawk
src\gawk
$ cygpath -w ../corinna/src/gawk
C:\cygwin\home\corinna\src\gawk

> In particular, I have no symlinks.  But I am not sure what you mean by
> "cross mount points.  Sorry for my ignorance [...]

Didn't you read the user's manual?

  http://cygwin.com/cygwin-ug-net/cygwin-ug-net.html


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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