Closed shqld closed 8 months ago
Thanks for the PR. It looks like there is a compilation error: https://github.com/nodejs/uvwasi/actions/runs/5854703133/job/15876962601
Sorry, I forgot to remove the unused variable 🤦🏼 and fixed another memory problem in tests.
This fixes https://github.com/nodejs/node/issues/49107 (relative paths in symlinks resolved incorrectly).
When following a symbolic link that points to a target using a relative path, the
uvwasi__resolve_path()
function resolves and normalizes the link's target as a relative path starting fromfd->real_path
. This should be treated as a relative path starting from the parent directory of the symbolic link.For example, given the directory structure below:
When
fd->real_path
is.
, the link target for link is resolved as../source_file
, not./source_file
. As a result, this resolution ends with anENOTCAPABLE
error.