This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: cygpath -w for non-existent server


On 6 December 2010 11:34, Corinna Vinschen wrote:
> Hi Andy,
>
> On Dec Â4 16:07, Corinna Vinschen wrote:
>> On Dec Â4 06:35, Andy Koppe wrote:
>> > With non-existent server foo, and Cygwin 1.7.7 or the latest 1.7.8 snapshot:
>> >
>> > $ 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. ÂThe "No such file or directory"
>> seems wrong though. ÂI'll investigate next week.
>
> Done. ÂThe behaviour is perfectly valid.
>
> - "//foo/bar" requires to access the path, which in turn triggers an SMB
> Ârequest on the wire. ÂThis takes a couple of seconds within Windows
> Âitself, even if the DNS request returns immediately that the server
> Âdoesn't exist. ÂNetBIOS? ÂAnyway, there's nothing Cygwin can do about
> Âit.
>
> - "//foo" is a virtual path, valid only in Cygwin. ÂYou can't access
> Â"\\foo" in the Win32 API using file or directory access functions. ÂIt
> Âjust doesn't exist as a path. ÂUNC paths are only valid with at least
> Âtwo path components as in "\\server\share". ÂSince "//foo" is a
> Âvirtual path, there's no Win32 equivalent. ÂSo, from the Windows
> Âperspective 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]