Open hoodmane opened 6 days ago
I think lookupPath
should be fixed not to call PATH_FS.resolve
and PATH_FS.resolve
should be updated to use lookupPath
.
Calls to PATH.normalize
are also probably wrong.
I have a fix for this in a local branch but there are too many conflicts right now so I will hold off on opening a PR until some of my other changes land.
If
link
is a symlink to a directory, thenlink/..
refers to the parent of the target of the link. For instance if we doln -s . link
thenrealpath link/..
andrealpath ..
point to the same thing.PATH_FS.resolve
will cancel thelink
with the..
which destroys the information needed to resolve the path correctly.Here's an example: Call the following
a.c
:Run it:
Note that if we pass
-sNODERAWFS
then the test works.