vboxsharedfs - Too many levels of symbolic links

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Dec 9 09:16:48 GMT 2021


On Dec  9 17:16, Takashi Yano wrote:
> On Wed, 8 Dec 2021 11:37:39 +0100
> Corinna Vinschen wrote:
> > On Dec  8 17:20, Takashi Yano wrote:
> > > On Tue, 7 Dec 2021 18:15:42 +0100
> > > I confirmed that your patch works nicely.
> > > 
> > > ...except when the drive is created by subst using UNC path,
> > > e.g. subst w: \\server\share.
> > > 
> > > In this case, WNetGetConnectionW() fails with ERROR_NO_NET_OR_BAD_PATH.
> > > 
> > > So, I modified your patch a bit.
> > > 
> > > What about attached patch?
> > 
> > Oh, great!  GetVolumePathNameW is the function I somehow missed when
> > looking into the Microsoft docs yesterday, so thanks for modifying the
> > patch this way.
> > 
> > Please push.
> 
> I noticed that this code does not work if UNC path "\\server\share\dir"
> (rather than "\\server\share") is mounted to virtual drive.

Oh drat, I tried that explicitely and I saw that WNetGetConnectionW
returns the same as `net use' on the command line.  So
GetVolumePathNameW only returns the actual share name?  Sigh.

> I will submit a patch for this issue. Sorry for testing insufficiently.

No worries and thanks,
Corinna


More information about the Cygwin mailing list