win: access should fail with EACCES, not EPERM

See https://pubs.opengroup.org/onlinepubs/9799919799/functions/access.html
This commit is contained in:
Jérôme Vouillon 2025-02-12 15:33:43 +01:00
parent dd18517ab5
commit 31f365ddca

View File

@ -2118,7 +2118,7 @@ static void fs__access(uv_fs_t* req) {
(attr & FILE_ATTRIBUTE_DIRECTORY)) {
SET_REQ_RESULT(req, 0);
} else {
SET_REQ_WIN32_ERROR(req, UV_EPERM);
SET_REQ_WIN32_ERROR(req, UV_EACCES);
}
}