-
Notifications
You must be signed in to change notification settings - Fork 775
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
ensureFileSync vs ensureDirSync #465
Labels
Comments
Yep, confirmed. The issue is that we're just checking if the path exists; we should stat the path and check if it's a file instead. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When
ensureDirSync
is called on a folder that already exists as a file,EEXIST
is thrown as expected.When
ensureFileSync
is called on a file that already exists as a folder nothing is thrown.Should not the two behaviours be the same? IMHO either both should throw or none of them should throw.
The text was updated successfully, but these errors were encountered: