From 81eb8d519233c105f30dc0a278607e62b20502fd Mon Sep 17 00:00:00 2001 From: Alexander Courtis Date: Sat, 6 Apr 2024 12:28:41 +1100 Subject: [PATCH] fix(#2733): escape trash path (#2735) * fix(#2733): escape trash path * fix(#2733): escape trash path * fix(#2733): escape trash path --- lua/nvim-tree/actions/fs/trash.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/nvim-tree/actions/fs/trash.lua b/lua/nvim-tree/actions/fs/trash.lua index 3ea660ac..8188d867 100644 --- a/lua/nvim-tree/actions/fs/trash.lua +++ b/lua/nvim-tree/actions/fs/trash.lua @@ -42,7 +42,7 @@ function M.remove(node) -- trashes a path (file or folder) local function trash_path(on_exit) local need_sync_wait = utils.is_windows - local job = vim.fn.jobstart(M.config.trash.cmd .. ' "' .. node.absolute_path .. '"', { + local job = vim.fn.jobstart(M.config.trash.cmd .. " " .. vim.fn.shellescape(node.absolute_path), { detach = not need_sync_wait, on_exit = on_exit, on_stderr = on_stderr,