-
Notifications
You must be signed in to change notification settings - Fork 30k
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
fs.access() not reporting error on Windows #19192
Comments
See #7700 , |
Setting a doc label because the documentation seems to be misleading:
|
Also cc @bnoordhuis is that a wont-fix on Windows? |
This can be probably fixed in libuv, there is AccessCheck function in WinAPI that seems to do just that. For now lets just document this. |
I don't know if we should (but I also don't know if we shouldn't); we don't check ACLs on other platforms. |
Not all platforms use ACLs as their native permissions mechanism. Ignoring ACLs makes
|
Determining whether an ACL applies is a Hard Problem on many platforms. Doing it on one platform but not others makes it inconsistent. You're welcome to open a pull request but I expect other collaborators will raise the same concern. |
I agree that this behavior makes As far as consistency is concerned, things are already inconsistent in behavior if |
Actually in 10.15.3 LTS, it does NOTHING, not even file existence check. I dont even have a D drive on my machine, and C:\dev does exist.
|
I am having this exact issue. I am reading a directory's contents into an array, and getting the stat for each item. I attempted to use fs.access to filter out un-readable folders/files but it would not throw an error. I ended up using the error fs.stat provides to do my filtering. A janky solution, don't like it. |
fs.access() returns no error when given a file/directory with no priveleges.
Code example:
Output:
The text was updated successfully, but these errors were encountered: