This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: get cygpath to leave relative paths as relative?
- From: Corinna Vinschen <corinna-cygwin at cygwin dot com>
- To: cygwin at cygwin dot com
- Date: Tue, 11 Dec 2007 16:11:50 +0100
- Subject: Re: get cygpath to leave relative paths as relative?
- References: <308716.36518.qm@web53808.mail.re2.yahoo.com>
- Reply-to: cygwin at cygwin dot com
On Dec 10 22:34, Brent wrote:
> If I execute
> mypath=`cygpath -w ../`
> echo $mypath
>
> I get
> d:\unix\nextVersion\script
>
> OK, d:\unix\nextVersion\script is the correct windows version of the path, but it is in absolute form. I would prefer it if cygpath left it in relative form, i.e.
> echo $mypath
> should output
> ..\
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.
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/