Skip to content

Commit

Permalink
Revert "win,errors: remap ERROR_ACCESS_DENIED to UV_EACCES (libuv#3193)…
Browse files Browse the repository at this point in the history
…" (libuv#3565)

Although the change remapped the error code to the correct one, a lot of
code already depends on the incorrect one, so it's not worth the
breakage.

This reverts commit 04a35ef.

Refs: nodejs/node#42340
Signed-off-by: Darshan Sen <raisinten@gmail.com>
  • Loading branch information
RaisinTen authored Mar 20, 2022
1 parent 4d8af0c commit a6ba1d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/win/error.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ int uv_translate_sys_error(int sys_errno) {
case WSAEACCES: return UV_EACCES;
case ERROR_ELEVATION_REQUIRED: return UV_EACCES;
case ERROR_CANT_ACCESS_FILE: return UV_EACCES;
case ERROR_ACCESS_DENIED: return UV_EACCES;
case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE;
case WSAEADDRINUSE: return UV_EADDRINUSE;
case WSAEADDRNOTAVAIL: return UV_EADDRNOTAVAIL;
Expand Down Expand Up @@ -155,6 +154,7 @@ int uv_translate_sys_error(int sys_errno) {
case WSAENOTSOCK: return UV_ENOTSOCK;
case ERROR_NOT_SUPPORTED: return UV_ENOTSUP;
case ERROR_BROKEN_PIPE: return UV_EOF;
case ERROR_ACCESS_DENIED: return UV_EPERM;
case ERROR_PRIVILEGE_NOT_HELD: return UV_EPERM;
case ERROR_BAD_PIPE: return UV_EPIPE;
case ERROR_NO_DATA: return UV_EPIPE;
Expand Down

0 comments on commit a6ba1d7

Please sign in to comment.