You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
-- no configuration is needed, default configuration will still cause the same issue so I just paste the original nvt-min.lua herevim.g.loaded_netrw=1vim.g.loaded_netrwPlugin=1vim.cmd([[set runtimepath=$VIMRUNTIME]])
vim.cmd([[set packpath=/tmp/nvt-min/site]])
localpackage_root="/tmp/nvt-min/site/pack"localinstall_path=package_root.."/packer/start/packer.nvim"localfunctionload_plugins()
require("packer").startup({
{
"wbthomason/packer.nvim",
"nvim-tree/nvim-tree.lua",
"nvim-tree/nvim-web-devicons",
-- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
},
config= {
package_root=package_root,
compile_path=install_path.."/plugin/packer_compiled.lua",
display= { non_interactive=true },
},
})
endifvim.fn.isdirectory(install_path) ==0thenprint("Installing nvim-tree and dependencies.")
vim.fn.system({ "git", "clone", "--depth=1", "https://github.com/wbthomason/packer.nvim", install_path })
endload_plugins()
require("packer").sync()
vim.cmd([[autocmd User PackerComplete ++once echo "Ready!" | lua setup()]])
vim.opt.termguicolors=truevim.opt.cursorline=true-- MODIFY NVIM-TREE SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE_G.setup=function()
require("nvim-tree").setup({})
end-- UNCOMMENT this block for diagnostics issues, substituting pattern and cmd as appropriate.-- Requires diagnostics.enable = true in setup.--[[vim.api.nvim_create_autocmd("FileType", { pattern = "lua", callback = function() vim.lsp.start { name = "my-luals", cmd = { "lua-language-server" }, root_dir = vim.loop.cwd(), } end,})]]
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:
Many thanks for the detailed reproducer! Confirmed.
[NvimTree] Could not remove /home/alex/src/nvim-tree/r/3077/testing/testing/first-dir warning on deleting first-dir does indicate that something went very wrong.
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: