realpath issue with native[strict] symlinks
Jeremy Drake
cygwin@jdrake.com
Tue May 18 20:01:50 GMT 2021
Sorry ,forgot subject
On Tue, 18 May 2021, Jeremy Drake wrote:
> > 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.
>
--
Worst Response To A Crisis, 1985:
From a readers' Q and A column in TV GUIDE: "If we get involved
in a nuclear war, would the electromagnetic pulses from exploding
bombs damage my videotapes?"
More information about the Cygwin
mailing list