-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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.rmSync
returns wrong error code for not empty directory
#57095
Comments
koplas
added a commit
to koplas/node
that referenced
this issue
Feb 17, 2025
Return the correct error code, when a directory_not_empty error occurred. Fixes: nodejs#57095
koplas
added a commit
to koplas/node
that referenced
this issue
Feb 17, 2025
Return the correct error code, when a directory_not_empty error occurred. Fixes: nodejs#57095
koplas
added a commit
to koplas/node
that referenced
this issue
Feb 17, 2025
Return the correct error code, when a directory_not_empty error occurred. Fixes: nodejs#57095
koplas
added a commit
to koplas/node
that referenced
this issue
Feb 17, 2025
Return the correct error code, when a directory_not_empty error occurred. Fixes: nodejs#57095
koplas
added a commit
to koplas/node
that referenced
this issue
Feb 17, 2025
Return the correct error code, when a directory_not_empty error occurred. Fixes: nodejs#57095
koplas
added a commit
to koplas/node
that referenced
this issue
Feb 18, 2025
Return the correct error code, when a directory_not_empty error occurred. Fixes: nodejs#57095
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version
v23.7.0
Platform
Subsystem
No response
What steps will reproduce the bug?
Call
fs.rmSync
on a not empty directory.How often does it reproduce? Is there a required condition?
The not empty directory error must occur.
What is the expected behavior? Why is that the expected behavior?
Get the result code of
ENOTEMPTY
.What do you see instead?
Get the result code of
EACCES
.Additional information
The relevant line that returns the wrong error code:
node/src/node_file.cc
Lines 1706 to 1708 in 69fdce2
A list of constants and their error codes: https://en.cppreference.com/w/cpp/error/errc.
The text was updated successfully, but these errors were encountered: