mirror of
https://github.com/neovim/neovim
synced 2025-07-16 01:01:49 +00:00
fix(vim.fs): dirname() returns "." on mingw/msys2 #30480
Problem:
`vim.fs.dirname([[C:\User\XXX\AppData\Local]])` returns "." on
mingw/msys2.
Solution:
- Check for "mingw" when deciding `iswin`.
- Use `has("win32")` where possible, it works in "fast" contexts since
b02eeb6a72
.
This commit is contained in:
@ -3,7 +3,7 @@ local log = require('vim.lsp.log')
|
||||
local protocol = require('vim.lsp.protocol')
|
||||
local validate, schedule, schedule_wrap = vim.validate, vim.schedule, vim.schedule_wrap
|
||||
|
||||
local is_win = uv.os_uname().version:find('Windows')
|
||||
local is_win = vim.fn.has('win32') == 1
|
||||
|
||||
--- Checks whether a given path exists and is a directory.
|
||||
---@param filename string path to check
|
||||
|
Reference in New Issue
Block a user