mirror of
https://github.com/neovim/neovim.git
synced 2025-12-11 09:02:40 +00:00
fix(vim.fs): root() should always return absolute path #36466
This commit is contained in:
@@ -450,7 +450,8 @@ function M.root(source, marker)
|
||||
})
|
||||
|
||||
if #paths ~= 0 then
|
||||
return vim.fs.dirname(paths[1])
|
||||
local dir = vim.fs.dirname(paths[1])
|
||||
return dir and vim.fn.fnamemodify(dir, ':p:h') or nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user