error in "cygpath" behavior

Corinna Vinschen corinna-cygwin@cygwin.com
Fri Aug 31 19:36:00 GMT 2018


On Aug 30 21:37, Steven Penny wrote:
> It is my understanding that given relative input, "cygpath" shall produce
> relative output unless given "-a" option. However I noticed a discrepancy. These
> are all correct:
> 
>    $ cygpath .
>    .
> 
>    $ cygpath ..
>    ..
> 
>    $ cygpath -w .
>    .
> 
> This is not:
> 
>    $ cygpath -w ..
>    C:\cygwin64\home\

Long-standing behaviour.  ".." in Cygwin and ".." in Windows can totally
disagree.  The path is always convert to absolute at this point in favor
of correct output.  There's also the additional restriction (though
not in this case) that relative Windows paths must not be longer than
MAX_PATH (260) chars.

I'm certainly open to patches to the underlying cygwin_conv_path
function to change the Windows path to relative if possible.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Maintainer                 cygwin AT cygwin DOT com
Red Hat
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20180831/b6f333c4/attachment.sig>


More information about the Cygwin mailing list