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>
This commit is contained in:
Jeremy Drake 2021-05-19 14:40:23 +02:00 committed by Corinna Vinschen
parent 7b8edba625
commit c8949d0400
1 changed files with 2 additions and 7 deletions

View File

@ -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. */