-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
win,errors: remap ERROR_ACCESS_DENIED
to UV_EACCES
#3193
win,errors: remap ERROR_ACCESS_DENIED
to UV_EACCES
#3193
Conversation
Also, question: Why are we using |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
a73f273
to
c857a5f
Compare
If we try to use uv_fs_rmdir on a read-only directory on Windows, it internally calls _wrmdir, which sets _doserrno to ERROR_ACCESS_DENIED and errno to EACCES. However, ERROR_ACCESS_DENIED is mapped to UV_EPERM, so I believe it should be remapped to UV_EACCES. Signed-off-by: Darshan Sen <raisinten@gmail.com>
c857a5f
to
35f72bc
Compare
cc @vtjnash can this get a review plz? CI is green |
Would this end up changing anything else, such as |
@vtjnash I don't know of a way to cause an |
For example, what result do you get if you try to chmod |
@vtjnash I tried running https://github.com/RaisinTen/tests/blob/3abee9e7a2344e450eaa1715dd89718a31abde66/test.js and it seems to work with no errors: https://github.com/RaisinTen/tests/runs/4060722205?check_suite_focus=true |
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions. |
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>
…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>
If we try to use uv_fs_rmdir on a read-only directory on Windows, it internally calls _wrmdir, which sets _doserrno to ERROR_ACCESS_DENIED and errno to EACCES. However, ERROR_ACCESS_DENIED is mapped to UV_EPERM, so I believe it should be remapped to UV_EACCES.
…" (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>
…ibuv#3193)" (libuv#3565)" This reverts commit a6ba1d7. This revert was supposed to happen only on libuv v1.x, not libuv master.
…ibuv#3193)" (libuv#3565)" This reverts commit a6ba1d7. This revert was supposed to happen only on libuv v1.x, not libuv master.
This reverts commit a6ba1d7 (libuv#3565) This revert was supposed to happen only on libuv v1.x, not libuv master.
…ibuv#3193)" (libuv#3565)" This reverts commit a6ba1d7. This revert was supposed to happen only on libuv v1.x, not libuv master.
If we try to use
uv_fs_rmdir
on a read-only directory on Windows, itinternally calls
_wrmdir
, which sets_doserrno
toERROR_ACCESS_DENIED
and
errno
toEACCES
. However,ERROR_ACCESS_DENIED
is mapped toUV_EPERM
,so I believe it should be remapped to
UV_EACCES
.Signed-off-by: Darshan Sen raisinten@gmail.com