mirror of
https://github.com/neovim/neovim.git
synced 2025-12-16 03:15:39 +00:00
fix(vim.fs.normalize): normalize case for windows drive letter
Also add tests for the current path casing behavior so it doesn't get accidentally changed.
This commit is contained in:
@@ -629,8 +629,8 @@ function M.normalize(path, opts)
|
||||
return prefix .. path
|
||||
end
|
||||
|
||||
-- Remove extraneous slashes from the prefix
|
||||
prefix = prefix:gsub('/+', '/')
|
||||
-- Ensure capital drive and remove extraneous slashes from the prefix
|
||||
prefix = prefix:gsub('^%a:', string.upper):gsub('/+', '/')
|
||||
end
|
||||
|
||||
if not opts._fast then
|
||||
|
||||
Reference in New Issue
Block a user