`fs.existsSync` returns wrong value on windows if there are no permissions on the given file · Issue #17921 · nodejs/node
- Version: v9.2.0
- Platform: windows 8.1
- Subsystem: fs
Steps to reproduce the issue
- Create a file (for example
1.txt) - Disable permissions inheritance and remove all inherited permissions from the file
- Execute
fs.existsSync('1.txt')
What is the expected behavior
The file exists (and it is also listed if you readdirSync it's parent directory), so the return value should be true.
What went wrong
The return value is false, like the file doesn't exist. If it is working as intended, then consider this issue as a feature request. However, if you're not aware of this behavior, then I'm pretty sure it is a bug.