aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Odding <peter@peterodding.com>2011-07-09 00:51:28 +0200
committerPeter Odding <peter@peterodding.com>2011-07-09 00:51:28 +0200
commitba99f5f17c2a80637377d01b5f124abb5b7f74cc (patch)
tree26ab49ca1413c1262a6e74aa23c7c5a5692b9fea
parentee0966c041bb48e9b2537ed36e09666be1f1f45f (diff)
downloadvim-easytags-ba99f5f17c2a80637377d01b5f124abb5b7f74cc.tar.gz
Skip unreadable tags files returned by tagfiles() (reported by Hannes von Haugwitz)
-rw-r--r--autoload/xolox/easytags.vim14
-rw-r--r--plugin/easytags.vim2
2 files changed, 10 insertions, 6 deletions
diff --git a/autoload/xolox/easytags.vim b/autoload/xolox/easytags.vim
index 03bb05d..038a3ae 100644
--- a/autoload/xolox/easytags.vim
+++ b/autoload/xolox/easytags.vim
@@ -493,11 +493,15 @@ function! s:cache_tagged_files() " {{{3
" other purposes anyway (so the cache doesn't introduce too much overhead).
let starttime = xolox#misc#timer#start()
for tagsfile in tagfiles()
- let fname = s:canonicalize(tagsfile)
- let ftime = getftime(fname)
- if get(s:known_tagfiles, fname, 0) != ftime
- let [headers, entries] = xolox#easytags#read_tagsfile(fname)
- call s:cache_tagged_files_in(fname, ftime, entries)
+ if !filereadable(tagsfile)
+ call xolox#misc#msg#warn("easytags.vim %s: Skipping unreadable tags file %s!", fname)
+ else
+ let fname = s:canonicalize(tagsfile)
+ let ftime = getftime(fname)
+ if get(s:known_tagfiles, fname, 0) != ftime
+ let [headers, entries] = xolox#easytags#read_tagsfile(fname)
+ call s:cache_tagged_files_in(fname, ftime, entries)
+ endif
endif
endfor
call xolox#misc#timer#stop("easytags.vim %s: Initialized cache of tagged files in %s.", g:easytags_version, starttime)
diff --git a/plugin/easytags.vim b/plugin/easytags.vim
index 7e93604..a563297 100644
--- a/plugin/easytags.vim
+++ b/plugin/easytags.vim
@@ -12,7 +12,7 @@ if &cp || exists('g:loaded_easytags')
finish
endif
-let g:easytags_version = '2.4.10'
+let g:easytags_version = '2.4.11'
" Configuration defaults and initialization. {{{1