Skip to content

Commit

Permalink
fix(util): check $XDG_CONFIG_HOME before use as data home (#4492)
Browse files Browse the repository at this point in the history
  • Loading branch information
fannheyward committed Aug 31, 2023
1 parent abdb129 commit b1e5d71
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion autoload/coc/util.vim
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ function! coc#util#get_data_home()
if !empty(get(g:, 'coc_data_home', ''))
let dir = resolve(expand(g:coc_data_home))
else
if exists('$XDG_CONFIG_HOME')
if exists('$XDG_CONFIG_HOME') && isdirectory(resolve($XDG_CONFIG_HOME))
let dir = resolve($XDG_CONFIG_HOME."/coc")
else
if s:is_win
Expand Down

0 comments on commit b1e5d71

Please sign in to comment.