Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use old_path_len argument in symlink creation #234

Merged
merged 3 commits into from
Dec 4, 2023

Conversation

alex-snezhko
Copy link
Contributor

Currently the old_path_len argument is ignored in the implementation of path_symlink and the call to uv_fs_symlink uses the original null-terminated old_path, which differs to how the path_len arguments in other functions are treated.

This PR truncates the "old path" passed to libuv down to the length passed into old_path_len.

@phated phated requested review from ospencer and phated October 15, 2023 20:13
Copy link
Member

@ospencer ospencer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense, and great tests too.

@mhdawson mhdawson merged commit 8246ba2 into nodejs:main Dec 4, 2023
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants