X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,TW_YG,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <20101206113429.GC17176@calimero.vinschen.de> References: <20101204150728 DOT GB26471 AT calimero DOT vinschen DOT de> <20101206113429 DOT GC17176 AT calimero DOT vinschen DOT de> Date: Mon, 6 Dec 2010 11:59:12 +0000 Message-ID: Subject: Re: cygpath -w for non-existent server From: Andy Koppe To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 On 6 December 2010 11:34, Corinna Vinschen wrote: > Hi Andy, > > On Dec =C2=A04 16:07, Corinna Vinschen wrote: >> On Dec =C2=A04 06:35, Andy Koppe wrote: >> > With non-existent server foo, and Cygwin 1.7.7 or the latest 1.7.8 sna= pshot: >> > >> > $ cygpath -w //foo/bar >> > \\foo\bar >> > >> > $ cygpath -w //foo >> > cygpath: error converting "//foo" - No such file or directory >> > >> > Is that as intended? >> > >> > Also, both only return after a few seconds delay, so I assume they >> > trigger network accesses. Is that necessary? >> >> Probably yes, due to the way SMB works. =C2=A0The "No such file or direc= tory" >> seems wrong though. =C2=A0I'll investigate next week. > > Done. =C2=A0The behaviour is perfectly valid. > > - "//foo/bar" requires to access the path, which in turn triggers an SMB > =C2=A0request on the wire. =C2=A0This takes a couple of seconds within Wi= ndows > =C2=A0itself, even if the DNS request returns immediately that the server > =C2=A0doesn't exist. =C2=A0NetBIOS? =C2=A0Anyway, there's nothing Cygwin = can do about > =C2=A0it. > > - "//foo" is a virtual path, valid only in Cygwin. =C2=A0You can't access > =C2=A0"\\foo" in the Win32 API using file or directory access functions. = =C2=A0It > =C2=A0just doesn't exist as a path. =C2=A0UNC paths are only valid with a= t least > =C2=A0two path components as in "\\server\share". =C2=A0Since "//foo" is a > =C2=A0virtual path, there's no Win32 equivalent. =C2=A0So, from the Windo= ws > =C2=A0perspective there's "No such file or directory". Weird. "\\server" works fine in Explorer and also with cygstart, so I guess Explorer implements it as some sort of virtual directory. Is that enough reason to support it as a special case in the Cygwin path conversion? Thanks for looking into this. Andy -- 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