comparison plugin/gutentags.vim @ 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
comparison
equal deleted inserted replaced
75:d12543f11eb9 76:fa749380e05a
67 endif 67 endif
68 68
69 if !exists('g:gutentags_cache_dir') 69 if !exists('g:gutentags_cache_dir')
70 let g:gutentags_cache_dir = '' 70 let g:gutentags_cache_dir = ''
71 else 71 else
72 " Make sure we get an absolute/resolved path (e.g. expanding `~/`), and
73 " strip any trailing slash.
74 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':p')
72 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??') 75 let g:gutentags_cache_dir = fnamemodify(g:gutentags_cache_dir, ':s?[/\\]$??')
73 endif 76 endif
74 77
75 if !exists('g:gutentags_define_advanced_commands') 78 if !exists('g:gutentags_define_advanced_commands')
76 let g:gutentags_define_advanced_commands = 0 79 let g:gutentags_define_advanced_commands = 0