Skip to content

Commit

Permalink
Make sure we expand the cache directory before we auto-create it.
Browse files Browse the repository at this point in the history
This is because Vim functions like `isdirectory` won't work with paths like
`~/foo/bar`, for instance.
  • Loading branch information
ludovicchabant committed Jul 27, 2015
1 parent 57a3ce9 commit da7a84a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions plugin/gutentags.vim
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ endif
if !exists('g:gutentags_cache_dir')
let g:gutentags_cache_dir = ''
else
" Make sure we get an absolute/resolved path (e.g. expanding `~/`), and
" strip any trailing slash.
let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':p')
let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??')
endif

Expand Down

0 comments on commit da7a84a

Please sign in to comment.