public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Jeremy Drake <cygwin@jdrake.com>
To: cygwin@cygwin.com
Date: Tue, 18 May 2021 13:00:57 -0700 (PDT)	[thread overview]
Message-ID: <alpine.BSO.2.21.2105181256540.14962@resin.csoft.net> (raw)

> Sorry, but there's only this or that, not both.  Either we revert the
> entire change, including the native shortcut stuff, or we do it
> completely and fully, including handling virtual drives as symlinks.

I had success with just the following change (of course comments would
also need to be updated):

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 4ebaf4dc6..53534b8b6 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3670,8 +3670,7 @@ restart:
 		   somewhere else, thus, it's a symlink in POSIX speak. */
 		if (upath.Length == 14)	/* \??\X:\ */
 		  {
-		    fileattr &= ~FILE_ATTRIBUTE_DIRECTORY;
-		    path_flags |= PATH_SYMLINK;
+		    goto file_not_symlink;
 		  }
 		/* For final paths differing in inner path components return
 		   length as negative value.  This informs path_conv::check

Treating mapped/subst drives as though they were not symlinks, without
messing with intermedate symlinks.

                 reply	other threads:[~2021-05-18 20:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=alpine.BSO.2.21.2105181256540.14962@resin.csoft.net \
    --to=cygwin@jdrake.com \
    --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).