Skip empty directories in pathogen#helptags()

This commit is contained in:
Sebastian Jaeger
2010-10-15 16:16:23 +02:00
committed by Tim Pope
parent 52b091892c
commit 968e87ef7f
+1 -1
View File
@@ -133,7 +133,7 @@ let s:done_bundles = ''
" Invoke :helptags on all non-$VIM doc directories in runtimepath.
function! pathogen#helptags() " {{{1
for dir in pathogen#split(&rtp)
if dir[0 : strlen($VIM)-1] !=# $VIM && isdirectory(dir.'/doc') && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
if dir[0 : strlen($VIM)-1] !=# $VIM && isdirectory(dir.'/doc') && !empty(glob(dir.'/doc/*')) && (!filereadable(dir.'/doc/tags') || filewritable(dir.'/doc/tags'))
helptags `=dir.'/doc'`
endif
endfor