Skip to content
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

ENOENT or ENOTDIR in fs module #3850

Closed
rifler opened this issue Nov 16, 2015 · 4 comments
Closed

ENOENT or ENOTDIR in fs module #3850

rifler opened this issue Nov 16, 2015 · 4 comments
Labels
fs Issues and PRs related to the fs subsystem / file system. macos Issues and PRs related to the macOS platform / OSX.

Comments

@rifler
Copy link

rifler commented Nov 16, 2015

There is a test here for fs.openSync open non-existent file. It should raise ENOENT error.

But on my mac os 10.10.5 with node 5.0.0 installed via homebrew this test raised ENOTDIR error.

Is it expected behaviour?

@yosuke-furukawa
Copy link
Member

ENOTDIR error is thrown when the path includes a file.
I guess you have a file in the path /path/to/file/that/does/not/exist .

@rifler
Copy link
Author

rifler commented Nov 16, 2015

I haven't /path dir at all.

@Fishrock123 Fishrock123 added the fs Issues and PRs related to the fs subsystem / file system. label Nov 16, 2015
@mscdex mscdex added the macos Issues and PRs related to the macOS platform / OSX. label Nov 16, 2015
@yosuke-furukawa
Copy link
Member

hmm... don't you have a file named path at top level dir?
I have a similar situation (OSX 10.11, Node v5.0), but I have not caught the problem.
Would you execute sudo ls -al / and paste the result?

@rifler
Copy link
Author

rifler commented Nov 7, 2019

fixed in #30280

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. macos Issues and PRs related to the macOS platform / OSX.
Projects
None yet
Development

No branches or pull requests

4 participants