Skip to content

Commit 5cc093d

Browse files
committed
avoid vim.fs.normalize on unix for v0.8
1 parent a86990a commit 5cc093d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Diff for: lua/neo-tree/utils/init.lua

+2-1
Original file line numberDiff line numberDiff line change
@@ -852,6 +852,7 @@ M.resolve_config_option = function(state, config_option, default_value)
852852
end
853853
end
854854

855+
local nvim_v09 = vim.fn.has("nvim-0.9") == 1
855856
---Normalize a path, to avoid errors when comparing paths.
856857
---@param path string The path to be normalize.
857858
---@return string string The normalized path.
@@ -864,7 +865,7 @@ M.normalize_path = function(path)
864865
path = vim.fs.normalize(path, { win = true })
865866
-- Now use backslashes, as expected by the rest of Neo-Tree's code
866867
path = path:gsub("/", M.path_separator)
867-
else
868+
elseif nvim_v09 then
868869
path = vim.fs.normalize(path)
869870
end
870871
return path

0 commit comments

Comments
 (0)