diff options
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/util.lua | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lua/lspconfig/util.lua b/lua/lspconfig/util.lua index 89fca869..c4c21c22 100644 --- a/lua/lspconfig/util.lua +++ b/lua/lspconfig/util.lua @@ -121,7 +121,9 @@ M.path = (function() local strip_dir_pat = path_sep.."([^"..path_sep.."]+)$" local strip_sep_pat = path_sep.."$" dirname = function(path) - if not path then return end + if not path or #path == 0 then + return + end local result = path:gsub(strip_sep_pat, ""):gsub(strip_dir_pat, "") if #result == 0 then return "/" |
