aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/fs.lua
diff options
context:
space:
mode:
authordundargoc <gocdundar@gmail.com>2025-01-01 13:13:40 +0100
committerdundargoc <33953936+dundargoc@users.noreply.github.com>2025-01-01 23:42:42 +0100
commit6dc0eb9f41e6453fe003dd3a28c58b701fd003c9 (patch)
treea7360ec58e9b908a197c95e63aef65caacccb13d /runtime/lua/vim/fs.lua
parentdc692f553aae367a03f286e0d59561247941f96c (diff)
downloadrneovim-6dc0eb9f41e6453fe003dd3a28c58b701fd003c9.tar.gz
rneovim-6dc0eb9f41e6453fe003dd3a28c58b701fd003c9.tar.bz2
rneovim-6dc0eb9f41e6453fe003dd3a28c58b701fd003c9.zip
fix(vim.fs.abspath): correctly handle UNC paths
Diffstat (limited to 'runtime/lua/vim/fs.lua')
-rw-r--r--runtime/lua/vim/fs.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua
index d042df96e5..ee713e4b58 100644
--- a/runtime/lua/vim/fs.lua
+++ b/runtime/lua/vim/fs.lua
@@ -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