public inbox for
help / color / mirror / Atom feed
From: Jon TURNEY <>
Subject: [setup - the official Cygwin setup program] branch master, updated. release_2.915
Date: Mon, 10 Jan 2022 15:13:47 +0000 (GMT)	[thread overview]
Message-ID: <> (raw);h=2fd81bdf6ad6fc0c116c4a9b4c888f6b9110c08e

commit 2fd81bdf6ad6fc0c116c4a9b4c888f6b9110c08e
Author: Jon Turney <>
Date:   Sun Jan 9 21:17:14 2022 +0000

    Improve symlinks to absolute paths made for ' --symlink-type native'
    Match Cygwin DLL behaviour of not using '\\?\' prefix if the target path
    is short enough not to need it.
    This improves how the symlink is reported by CMD buildin 'DIR', and
    handled by File Explorer's file properties dialog.

--- | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/ b/
index 190b74d5..cf4df8b1 100644
--- a/
+++ b/
@@ -282,6 +282,11 @@ mknativesymlink (const char *from, const char *to)
       // convert back from nt namespace to win32 file namespace to use with
       // CreateSymbolicLinkW()
       wabsto[1] = '\\';
+      // Some parts of Windows don't correctly handle a win32 file namespace
+      // prefix in the symlink target. So, for maximum interoperability, we use
+      // a short path instead, if the target path will be less than MAX_PATH.
+      if (wcslen(wabsto) < (MAX_PATH + 4))
+        wto = wabsto + 4;

                 reply	other threads:[~2022-01-10 15:13 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:

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

  git send-email \ \ \ \

* 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).