get cygpath to leave relative paths as relative?
Corinna Vinschen
corinna-cygwin@cygwin.com
Tue Dec 11 15:12:00 GMT 2007
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/
More information about the Cygwin
mailing list