X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:date:from:to:cc:subject:in-reply-to :references:message-id; q=dns; s=default; b=wRhnCuNBCwe/D1QP1aAO CWFGSLa8RS7niudWVyO9v4ctmFA28niyll2nQ1ugF/RILDWr+Z7xGFI57LqLbJ2E nnV6QTs7lCVgEfc6uiojVkFUNzVx9YnSPImkKMElV87Uh6NFD5nmor0nrlJsAm7l QMmeMJkq/GdR08sjh6NXtow= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:date:from:to:cc:subject:in-reply-to :references:message-id; s=default; bh=Eup9KUA9aRFsuTnC29xWrR8s/V k=; b=HEmQPP61AZcwQKDIPnX6rkgcsDnNk4i8U6mZ/SoJqH7K5z6Vxsjmd0HKwW 9lwNuUDehLttiuYoNHCgPxv1Qn1kjx7ddVKTvMMLLMU2mK5E1cMpxXeEyx+HAmjx lAmKQ+Xk1840kyQEA+eXow8A/jSETkv+zlTXgZPN/5WgfpLvE= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 03 Apr 2019 13:49:37 -0400 From: Chris Wagner To: cygwin AT cygwin DOT com Cc: Andrey Repin Subject: Re: cygpath -u converts quoted UNC paths to local In-Reply-To: <209675900.20190403192000@yandex.ru> References: <209675900 DOT 20190403192000 AT yandex DOT ru> Message-ID: <1a20ea3b82704f60af0e11928077d839@plebeian.com> X-Sender: wagnerc AT plebeian DOT com User-Agent: Roundcube Webmail/1.3.7 X-IsSubscribed: yes 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