Skip to content

Commit

Permalink
Add support for UNC paths on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremyhaugen authored Oct 13, 2024
1 parent ccab9d5 commit 1a8d435
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/oil/fs.lua
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ end
---@return string
M.posix_to_os_path = function(path)
if M.is_windows then
if vim.startswith(path, "/") then
if vim.startswith(path, "/") and not vim.startswith(path, "//") then
local drive = path:match("^/(%a+)")
local rem = path:sub(drive:len() + 2)
return string.format("%s:%s", drive, rem:gsub("/", "\\"))
Expand Down

0 comments on commit 1a8d435

Please sign in to comment.