Skip to content

Commit ac8c730

Browse files
committed
Revert "win,errors: remap ERROR_ACCESS_DENIED to UV_EACCES (libuv#3193)"
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 <[email protected]>
1 parent 739e441 commit ac8c730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/win/error.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ int uv_translate_sys_error(int sys_errno) {
7373
case WSAEACCES: return UV_EACCES;
7474
case ERROR_ELEVATION_REQUIRED: return UV_EACCES;
7575
case ERROR_CANT_ACCESS_FILE: return UV_EACCES;
76-
case ERROR_ACCESS_DENIED: return UV_EACCES;
7776
case ERROR_ADDRESS_ALREADY_ASSOCIATED: return UV_EADDRINUSE;
7877
case WSAEADDRINUSE: return UV_EADDRINUSE;
7978
case WSAEADDRNOTAVAIL: return UV_EADDRNOTAVAIL;
@@ -155,6 +154,7 @@ int uv_translate_sys_error(int sys_errno) {
155154
case WSAENOTSOCK: return UV_ENOTSOCK;
156155
case ERROR_NOT_SUPPORTED: return UV_ENOTSUP;
157156
case ERROR_BROKEN_PIPE: return UV_EOF;
157+
case ERROR_ACCESS_DENIED: return UV_EPERM;
158158
case ERROR_PRIVILEGE_NOT_HELD: return UV_EPERM;
159159
case ERROR_BAD_PIPE: return UV_EPIPE;
160160
case ERROR_NO_DATA: return UV_EPIPE;

0 commit comments

Comments
 (0)