This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: get cygpath to leave relative paths as relative?


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]