We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 425f5ee commit 71122d7Copy full SHA for 71122d7
lua/nvim-tree/fs.lua
@@ -77,7 +77,12 @@ function M.create(node)
77
local num_entries = get_num_entries(utils.path_split(utils.path_remove_trailing(ans)))
78
for path in utils.path_split(ans) do
79
idx = idx + 1
80
- path_to_create = utils.path_join({path_to_create, path})
+ local p = utils.path_remove_trailing(path)
81
+ if #path_to_create == 0 and vim.fn.has('win32') == 1 then
82
+ path_to_create = utils.path_join({p, path_to_create})
83
+ else
84
+ path_to_create = utils.path_join({path_to_create, p})
85
+ end
86
if is_last_path_file and idx == num_entries then
87
create_file(path_to_create)
88
elseif not luv.fs_access(path_to_create, "r") then
0 commit comments