fix(vim.fs.abspath): correctly handle UNC paths

This commit is contained in:
dundargoc
2025-01-01 13:13:40 +01:00
committed by dundargoc
parent dc692f553a
commit 6dc0eb9f41
2 changed files with 4 additions and 3 deletions

View File

@@ -725,7 +725,7 @@ function M.abspath(path)
prefix, path = split_windows_path(path)
end
if vim.startswith(path, '/') then
if prefix == '//' or vim.startswith(path, '/') then
-- Path is already absolute, do nothing
return prefix .. path
end