[PATCH v2] Cygwin: respect PC_SYM_FOLLOW and PC_SYM_NOFOLLOW_REP with inner links

Jeremy Drake cygwin@jdrake.com
Mon May 31 17:55:24 GMT 2021


On Mon, 31 May 2021, Corinna Vinschen wrote:

> > So you're trying to keep the path length of the native CWD below
> > MAX_PATH?  I understand what you're trying to accomplish, but are
> > you sure this doesn't break Cygwin processes?  The idea of what
> > the native path of a directory is differs depending on calling
> > chdir and stuff like mkdir.

I'm not sure.  I've been running builds with this patch for a bit, and
haven't seen any issue, but MSYS2 doesn't use native symlinks so that
aspect of it hasn't been exercised.

>
> What bugs me here is that there's no guarantee that you can keep your
> path below MAX_PATH, independently of what you do here.  This is all
> a bit like patching up left and right just to keep dumb native tools
> running even in scenarios where they just fail otherwise.

Basically.  I wish there was a viable alternative (requiring everyone
trying to use them to set a registry value/policy, manifesting them for
long paths, and potentially patching them to be safe with long paths isn't
very viable).

> So we have two contradict problems, one which is solved by following
> inner symlinks, one which is solved by not doing that... I'm not overly
> keen to support this scenario.
>
> Wouldn't that be something more suited for an MSYS2-local patch?

Just the changing of the flag in chdir?  Because it seems like not
respecting the symlink-related PC flags for native inner links is a
bona-fide issue.



More information about the Cygwin-patches mailing list