mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-01 19:17:02 -04:00
fix: always normalize paths
Not doing this results in paths with a mix of '\\' and '/' for Windows. This isn't a problem when dealing with Neovim/luv APIs, but it is a problem when comparing strings.
This commit is contained in:
parent
b4c9c81a80
commit
dd6ec13268
2 changed files with 2 additions and 2 deletions
|
|
@ -110,7 +110,7 @@ local function install_health()
|
||||||
end
|
end
|
||||||
if
|
if
|
||||||
vim.iter(vim.api.nvim_list_runtime_paths()):any(function(p)
|
vim.iter(vim.api.nvim_list_runtime_paths()):any(function(p)
|
||||||
if installdir == p .. '/' then
|
if installdir == vim.fs.normalize(p) .. '/' then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
|
||||||
|
|
@ -562,7 +562,7 @@ local function install(languages, options, _callback)
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
|
|
||||||
local cache_dir = vim.fn.stdpath('cache')
|
local cache_dir = vim.fs.normalize(vim.fn.stdpath('cache'))
|
||||||
local install_dir = config.get_install_dir('parser')
|
local install_dir = config.get_install_dir('parser')
|
||||||
|
|
||||||
if not languages or type(languages) == 'string' then
|
if not languages or type(languages) == 'string' then
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue