mirror of
https://github.com/neovim/neovim.git
synced 2025-09-16 16:28:17 +00:00
backport: fix(vim.fs): dirname() returns "." on mingw/msys2 (#30484)
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:
@@ -1,5 +1,5 @@
|
||||
local health = vim.health
|
||||
local iswin = vim.uv.os_uname().sysname == 'Windows_NT'
|
||||
local iswin = vim.fn.has('win32') == 1
|
||||
|
||||
local M = {}
|
||||
|
||||
|
Reference in New Issue
Block a user