Deleting a directory containing symlink file will delete all content inside the symlink #3077
Labels
bug
Something isn't working
PR please
nvim-tree team does not have the bandwidth to implement; a PR will be gratefully appreciated
reproduced
Issue confirmed
Uh oh!
There was an error while loading. Please reload this page.
Description
If you delete a directory in nvim tree that contain a symlink directory, deletion will fail and then the content inside the symlink actual directory is gone. the symlink itself is still there but the content are gone.
I try to delete the node_modules folder in one of my project within nvim tree trying to clean things up. One of the dependency in my project is a symlink to my local repo:
it looks like this:
| node-modules/
|--- deps-a -> /home/user/dev/deps-a
After that an error occur saying that the deletion of node_modules directory cannot be done, but when I go back to my deps-a directory, everything is gone, even .git is gone.
Neovim version
Operating system and version
Nixos-24.11
Windows variant
No response
nvim-tree version
28eac28
Clean room replication
Steps to reproduce
delete first-dir from nvim tree
the file inside dir-to-delete is gone, but the symlink is still there
Expected behavior
the symlink should be be deleted, along with the first-dir, if that is not possible, nothing should had been done. I don't expect it to go into the symlink and delete everything for me
Actual behavior
The content inside the original symlink directory gets deleted.
After trying to delete first-dir, the content inside the symlink is deleted

The text was updated successfully, but these errors were encountered: