fix(#2081): do not change root for inexistent files (#2082)

This commit is contained in:
Alexander Courtis
2023-03-26 15:05:41 +11:00
committed by GitHub
parent 874b7be5d0
commit 6515a1e1a9

View File

@@ -42,6 +42,11 @@ function M.change_root(path, bufnr)
end end
end end
-- don't find inexistent
if vim.fn.filereadable(path) == 0 then
return
end
local cwd = core.get_cwd() local cwd = core.get_cwd()
local vim_cwd = vim.fn.getcwd() local vim_cwd = vim.fn.getcwd()