This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: cygpath -w converts relative paths to absolute windows paths
- From: Andrey Repin <anrdaemon at yandex dot ru>
- To: Roger Qiu <roger dot qiu at polycademy dot com>, cygwin at cygwin dot com
- Date: Tue, 7 Feb 2017 18:30:05 +0300
- Subject: Re: cygpath -w converts relative paths to absolute windows paths
- Authentication-results: sourceware.org; auth=none
- Authentication-results: smtp2o.mail.yandex.net; dkim=pass header.i=@yandex.ru
- References: <10eb657d-a00b-1609-a9b9-6373092c1ac1@polyhack.io>
- Reply-to: cygwin at cygwin dot com
Greetings, Roger Qiu!
> Hi,
> I've found that `cygpath --windows '../` will give back an absolute
> windows path.
> I thought this would only happen if you provide the `--absolute` flag,
> or when the path is a special cygwin path.
".." is a special path, that can't be safely converted.
In all cases, using absolute path is preferred for many reasons.
> But this occurs just for normal directories.
> I have come across a situation where I need to convert ntfs symlinks to
> unix symlinks and back. Sometimes these symlinks have relative paths
> them. Now by using cygpath --windows, I get back absolute paths, which
> means the integrity of the symlink isn't preserved.
> Can `cygpath --windows '../directory'` give back `..\directory` for
> paths aren't special cygwin paths? These relative backslashes are
> supported in Windows right now.
AFAIK, Windows do not support relative junction points.
--
With best regards,
Andrey Repin
Tuesday, February 7, 2017 18:27:52
Sorry for my terrible english...
--
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