Skip to content

Commit 00b46a1

Browse files
fix(filesystem): use shellescape for rmdir on windows (#1400)
fixes #1399
1 parent 146445f commit 00b46a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: lua/neo-tree/sources/filesystem/lib/fs_actions.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ M.delete_node = function(path, callback, noconfirm)
496496
-- first try using native system commands, which are recursive
497497
local success = false
498498
if utils.is_windows then
499-
local result = vim.fn.system({ "cmd.exe", "/c", "rmdir", "/s", "/q", path })
499+
local result = vim.fn.system({ "cmd.exe", "/c", "rmdir", "/s", "/q", vim.fn.shellescape(path) })
500500
local error = vim.v.shell_error
501501
if error ~= 0 then
502502
log.debug("Could not delete directory '", path, "' with rmdir: ", result)

0 commit comments

Comments
 (0)