From: Chris Wagner <wagnerc@plebeian.com>
To: cygwin@cygwin.com
Cc: Andrey Repin <anrdaemon@yandex.ru>
Subject: Re: cygpath -u converts quoted UNC paths to local
Date: Wed, 03 Apr 2019 17:49:00 -0000 [thread overview]
Message-ID: <1a20ea3b82704f60af0e11928077d839@plebeian.com> (raw)
In-Reply-To: <209675900.20190403192000@yandex.ru>
On 2019-04-03 12:20 pm, Andrey Repin wrote:
> Greetings, All!
>
> This can be considered "working by design", but it really imposes some
> serious
> restrictions on interoperability with Cygwin, that I think can be
> avoided.
>
> ...
>
> After some further testing, this seems to be affecting IP-based UNC
> paths
> only.
>
> The essence is this:
>
> $ dir "\\192.168.1.5\wwwroot\ccenter\bin\online.sh"
> 26.10.2018 18:16 431 online.sh
>
> $ cygpath -u \\192.168.1.5\wwwroot\ccenter\bin\online.sh
> //192.168.1.5/wwwroot/ccenter/bin/online.sh
>
> $ cygpath -u "\\192.168.1.5\wwwroot\ccenter\bin\online.sh"
> /192.168.1.5/wwwroot/ccenter/bin/online.sh
>
> $ cygpath -u \\HOSTING64.DARKDRAGON.LAN\wwwroot\ccenter\bin\online.sh
> //HOSTING64.DARKDRAGON.LAN/wwwroot/ccenter/bin/online.sh
>
> $ cygpath -u "\\HOSTING64.DARKDRAGON.LAN\wwwroot\ccenter\bin\online.sh"
> //HOSTING64.DARKDRAGON.LAN/wwwroot/ccenter/bin/online.sh
>
> $
Using echo is a good way of checking just what the shell is handing to
your program. But I totally agree that this is a major interoperability
annoyance.
I'm using Bash 4.4.12(3):
$ echo \\192.168.1.5\wwwroot\ccenter\bin\online.sh
\192.168.1.5wwwrootccenterbinonline.sh
$ echo "\\192.168.1.5\wwwroot\ccenter\bin\online.sh"
\192.168.1.5\wwwroot\ccenter\bin\online.sh
$ echo '\\192.168.1.5\wwwroot\ccenter\bin\online.sh'
\\192.168.1.5\wwwroot\ccenter\bin\online.sh
$ echo \\foo\wwwroot\ccenter\bin\online.sh
\foowwwrootccenterbinonline.sh
$ echo "\\foo\wwwroot\ccenter\bin\online.sh"
\foo\wwwroot\ccenter\bin\online.sh
$ echo '\\foo\wwwroot\ccenter\bin\online.sh'
\\foo\wwwroot\ccenter\bin\online.sh
read -r is an alternate way of getting text into a command line that
might otherwise turn into quoting hell.
$ read -r; cygpath -u $REPLY
\\192.168.1.5\wwwroot\ccenter\bin\online.sh
//192.168.1.5/wwwroot/ccenter/bin/online.sh
--
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
prev parent reply other threads:[~2019-04-03 17:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-03 16:20 Andrey Repin
2019-04-03 16:31 ` Corinna Vinschen
2019-04-04 7:50 ` Andrey Repin
2019-04-03 17:11 ` Achim Gratz
2019-04-03 17:42 ` EXT: " Garber, Dave (BHGE, Non-GE)
2019-04-03 17:49 ` Chris Wagner [this message]
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=1a20ea3b82704f60af0e11928077d839@plebeian.com \
--to=wagnerc@plebeian.com \
--cc=anrdaemon@yandex.ru \
--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).