Skip to content

fix(ext/node): map ERROR_INVALID_NAME to ENOENT on windows#26475

Merged
kt3k merged 1 commit intodenoland:mainfrom
kt3k:fix-error-invalid-name-mapping
Oct 23, 2024
Merged

fix(ext/node): map ERROR_INVALID_NAME to ENOENT on windows#26475
kt3k merged 1 commit intodenoland:mainfrom
kt3k:fix-error-invalid-name-mapping

Conversation

@kt3k
Copy link
Copy Markdown
Contributor

@kt3k kt3k commented Oct 22, 2024

In libuv on windows, ERROR_INVALID_NAME is mapped to ENOENT, but it is mapped to EINVAL in our compat implementation, which causes the issue #24899.

ref: https://github.com/libuv/libuv/blob/d4ab6fbba4669935a6bc23645372dfe4ac29ab39/src/win/error.c#L138

This PR fixes the above.

closes #24899
closes #26411
closes #23635
closes #21165
closes #19067

Copy link
Copy Markdown
Member

@bartlomieju bartlomieju left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for tracking this down!

@kt3k kt3k merged commit 285635d into denoland:main Oct 23, 2024
@kt3k kt3k deleted the fix-error-invalid-name-mapping branch October 23, 2024 02:28
bartlomieju pushed a commit that referenced this pull request Oct 25, 2024
In libuv on windows, `ERROR_INVALID_NAME` is mapped to `ENOENT`, but it
is mapped to `EINVAL` in our compat implementation, which causes the
issue #24899.

ref:
https://github.com/libuv/libuv/blob/d4ab6fbba4669935a6bc23645372dfe4ac29ab39/src/win/error.c#L138

closes #24899 
closes #26411
closes #23635
closes #21165
closes #19067
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment