-
Notifications
You must be signed in to change notification settings - Fork 30.2k
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.rm cannot delete a symlink which is part of a loop #45404
Labels
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
Comments
Workaround: try {
await rm(path, {...});
} catch (e) {
if ('code' in e && e.code === 'ELOOP') {
await unlink(p);
}
} |
Thanks for the report. Would you be interested in sending a PR to fix this? |
aduh95
added
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
labels
Nov 10, 2022
nathanael-ruf
added a commit
to nathanael-ruf/node
that referenced
this issue
Nov 12, 2022
nathanael-ruf
added a commit
to nathanael-ruf/node
that referenced
this issue
Nov 12, 2022
Trott
pushed a commit
to nathanael-ruf/node
that referenced
this issue
Nov 12, 2022
nathanael-ruf
added a commit
to nathanael-ruf/node
that referenced
this issue
Nov 13, 2022
marco-ippolito
pushed a commit
to marco-ippolito/node
that referenced
this issue
Nov 23, 2022
Fixes: nodejs#45404 PR-URL: nodejs#45439 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: LiviaMedeiros <livia@cirno.name> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
confirmed-bug
Issues with confirmed bugs.
fs
Issues and PRs related to the fs subsystem / file system.
Version
18.12.1
Platform
Darwin Nathanaels-MBP.fritz.box 22.1.0 Darwin Kernel Version 22.1.0: Sun Oct 9 20:14:30 PDT 2022; root:xnu-8792.41.9~2/RELEASE_ARM64_T8103 arm64
Subsystem
fs
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always. No.
What is the expected behavior?
Can delete symlinks that form a loop.
What do you see instead?
This error
Additional information
This
stat
call should probably be alstat
call.node/lib/internal/fs/utils.js
Line 772 in 1b97188
The text was updated successfully, but these errors were encountered: