public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Takashi Yano <takashi.yano@nifty.ne.jp>
To: cygwin@cygwin.com
Subject: Re: vboxsharedfs - Too many levels of symbolic links
Date: Wed, 8 Dec 2021 00:32:49 +0900	[thread overview]
Message-ID: <20211208003249.0901c94003421c1d1c06169c@nifty.ne.jp> (raw)
In-Reply-To: <Ya92dHe+1fq5CvXA@calimero.vinschen.de>

On Tue, 7 Dec 2021 15:57:56 +0100
Corinna Vinschen wrote:
> On Dec  7 09:46, Takashi Yano wrote:
> > I think '/cygdrive/z/..' should be '/cygdrive', however,
> > in current cygwin, it is interpreted into '//VBoxSrv'.
> > 
> > Is this as you intended?
> > 
> > With my patch which stops to treat UNC path as symlink,
> > '/cygdrive/z/..' returns '/cygdrive'.
> 
> Yeah, but...
> 
> ...what bugs me is that *every* UNC path is treated this way with
> that patch.  If you have a path like /cygdrive/x/a/b/c, with x:
> being a virtual drive pointing to //server/share, and with "b"
> being a symlink to "syml", what you get back is either
> 
>   //server/share/a/syml/c
> 
> without, or
> 
>   /cygdrive/x/a/b/c
> 
> with your patch.  What we would like to get back is
> 
>   /cygdrive/x/a/syml/c

With my patch, above case behaves like:

$ mount
C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)
D: on /cygdrive/d type iso9660 (binary,posix=0,user,noumount,auto)
Z: on /cygdrive/z type vboxsharedfolderfs (binary,posix=0,user,noumount,auto)
$ cd /cygdrive/z
$ mkdir -p aa/syml/cc
$ ln -s syml aa/bb
$ cd aa/bb/cc
$ /bin/pwd
/cygdrive/z/aa/syml/cc
$

Isn't this what you would like?


> So the real problem is not that we have an UNC path, but the fact that
> the drive letter expression is (correctly, but unwanted) converted to
> the matching UNC path by GetFinalPathNameByHandle.
> 
> Bottom line is, your patch is ok, please apply.  It would be nice,
> though, if we could just avoid the drive: -> UNC path conversion and
> keep the rest.


-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

  reply	other threads:[~2021-12-07 15:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-30 17:04 Oskar Skog
2021-11-30 21:40 ` Gackle, Philip P
2021-12-02 10:43 ` Corinna Vinschen
2021-12-05  2:54 ` Takashi Yano
2021-12-05 14:49   ` Oskar Skog
2021-12-06  3:31     ` Takashi Yano
2021-12-06  6:34       ` Oskar Skog
2021-12-06  8:04       ` Takashi Yano
2021-12-06 10:16   ` Corinna Vinschen
2021-12-06 10:55     ` Takashi Yano
2021-12-07  0:46       ` Takashi Yano
2021-12-07 14:57         ` Corinna Vinschen
2021-12-07 15:32           ` Takashi Yano [this message]
2021-12-07 15:43             ` Takashi Yano
2021-12-07 16:03             ` Corinna Vinschen
     [not found] <Ya+WvmECA+zAbuV9@calimero.vinschen.de>
2021-12-08  8:20 ` Takashi Yano
2021-12-08 10:37   ` Corinna Vinschen
2021-12-09  8:16     ` Takashi Yano
2021-12-09  9:16       ` Corinna Vinschen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211208003249.0901c94003421c1d1c06169c@nifty.ne.jp \
    --to=takashi.yano@nifty.ne.jp \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).