From ba99f5f17c2a80637377d01b5f124abb5b7f74cc Mon Sep 17 00:00:00 2001 From: Peter Odding Date: Sat, 9 Jul 2011 00:51:28 +0200 Subject: Skip unreadable tags files returned by tagfiles() (reported by Hannes von Haugwitz) --- autoload/xolox/easytags.vim | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'autoload') 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) -- cgit v1.2.3