From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82231 invoked by alias); 3 Apr 2019 17:49:40 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 82222 invoked by uid 89); 3 Apr 2019 17:49:40 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.1 required=5.0 tests=AWL,BAYES_05 autolearn=ham version=3.3.1 spammy=H*UA:Webmail, H*u:Webmail, H*UA:Roundcube, H*u:Roundcube X-HELO: www16.qth.com Received: from www16.qth.com (HELO www16.qth.com) (69.16.238.67) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 03 Apr 2019 17:49:39 +0000 Received: from [127.0.0.1] (port=54473 helo=www16.qth.com) by www16.qth.com with esmtpa (Exim 4.91) (envelope-from ) id 1hBk13-004txM-Bo; Wed, 03 Apr 2019 12:49:37 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 03 Apr 2019 17:49:00 -0000 From: Chris Wagner To: cygwin@cygwin.com Cc: Andrey Repin Subject: Re: cygpath -u converts quoted UNC paths to local In-Reply-To: <209675900.20190403192000@yandex.ru> References: <209675900.20190403192000@yandex.ru> Message-ID: <1a20ea3b82704f60af0e11928077d839@plebeian.com> X-Sender: wagnerc@plebeian.com User-Agent: Roundcube Webmail/1.3.7 X-IsSubscribed: yes X-SW-Source: 2019-04/txt/msg00026.txt.bz2 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