Mercurial > vim-gutentags
changeset 76:fa749380e05a
Make sure we expand the cache directory before we auto-create it.
This is because Vim functions like `isdirectory` won't work with paths like
`~/foo/bar`, for instance.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Mon, 27 Jul 2015 14:25:49 -0700 |
parents | d12543f11eb9 |
children | 208130c6245e |
files | plugin/gutentags.vim |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugin/gutentags.vim Mon Jul 27 14:18:10 2015 -0700 +++ b/plugin/gutentags.vim Mon Jul 27 14:25:49 2015 -0700 @@ -69,6 +69,9 @@ 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