public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: Handle virtual drives as non-symlinks
@ 2021-05-19 12:41 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2021-05-19 12:41 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c8949d04001e3dbc03651475b6cd1c5623400835

commit c8949d04001e3dbc03651475b6cd1c5623400835
Author: Jeremy Drake <cygwin@jdrake.com>
Date:   Wed May 19 14:40:23 2021 +0200

    Cygwin: Handle virtual drives as non-symlinks
    
    This avoids MAX_PATH-related problems in native tools in case the
    virtual drive points to a deep directory
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/path.cc | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index dd7048486..637c32348 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -3495,14 +3495,9 @@ restart:
 
 		     subst X: C:\foo\bar
 
-		   Treat it like a symlink.  This is required to tell an
-		   lstat caller that the "drive" is actually pointing
-		   somewhere else, thus, it's a symlink in POSIX speak. */
+		   Treat it as a normal file. */
 		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
 		   to skip realpath handling on the last path component. */


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-05-19 12:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-19 12:41 [newlib-cygwin] Cygwin: Handle virtual drives as non-symlinks Corinna Vinschen

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