public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: error in "cygpath" behavior
Date: Fri, 31 Aug 2018 19:36:00 -0000	[thread overview]
Message-ID: <20180831085734.GF6350@calimero.vinschen.de> (raw)
In-Reply-To: <5b88c605.1c69fb81.f383.a0b6@mx.google.com>

[-- Attachment #1: Type: text/plain, Size: 990 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2018-08-31  8:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-31 15:29 Steven Penny
2018-08-31 19:36 ` Corinna Vinschen [this message]
2018-08-31 22:34   ` cyg Simple
     [not found]     ` <ad34f7a7-ec71-de69-b2d2-711c2e8d61b0@redhat.com>
2018-09-01  7:17       ` Thomas Wolff
     [not found]   ` <5b89c269.1c69fb81.84d1a.6f1b@mx.google.com>
2018-09-01  6:40     ` Achim Gratz
2018-09-01  6:54     ` Brian Inglis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180831085734.GF6350@calimero.vinschen.de \
    --to=corinna-cygwin@cygwin.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).