fix(#2733): escape trash path (#2735)

* fix(#2733): escape trash path

* fix(#2733): escape trash path

* fix(#2733): escape trash path
This commit is contained in:
Alexander Courtis 2024-04-06 12:28:41 +11:00 committed by GitHub
parent d8d3a1590a
commit 81eb8d5192
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -42,7 +42,7 @@ function M.remove(node)
-- trashes a path (file or folder) -- trashes a path (file or folder)
local function trash_path(on_exit) local function trash_path(on_exit)
local need_sync_wait = utils.is_windows 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, detach = not need_sync_wait,
on_exit = on_exit, on_exit = on_exit,
on_stderr = on_stderr, on_stderr = on_stderr,