Mercurial > vim-gutentags
changeset 273:8ddbcbfa57b2
Re-create wildignore options file if missing
When the wildignore options file is a temp file it can be deleted by
other processes which clean up temp files, so check the file is readable
and re-create if necessary before adding it to the list of files from
which to read exclusion patterns (-x option for update_tags scripts).
Without this Gutentags sometimes gets stuck in a rut reporting ctags job
failed, probably because I use both GUI vim and terminal vim, but might
not use the GUI for days and when I return to it the temp file is gone.
author | Mark Woods <mwoods.online.ie@gmail.com> |
---|---|
date | Wed, 03 Aug 2022 18:22:56 +0100 |
parents | b094a03a8115 |
children | efe305d995a0 |
files | autoload/gutentags/ctags.vim |
diffstat | 1 files changed, 8 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/autoload/gutentags/ctags.vim Wed Jul 13 08:56:24 2022 +0800 +++ b/autoload/gutentags/ctags.vim Wed Aug 03 18:22:56 2022 +0100 @@ -247,9 +247,14 @@ function! s:generate_wildignore_options() abort if s:last_wildignores == &wildignore - " The 'wildignore' setting didn't change since last time we did this. - call gutentags#trace("Wildignore options file is up to date.") - return + " The 'wildignore' setting didn't change since last time we did this, + " but check if file still exist (could have been deleted if temp file) + if filereadable(s:wildignores_options_path) + call gutentags#trace("Wildignore options file is up to date.") + return + else + call gutentags#trace("Wildignore options file is not readable.") + endif endif if s:wildignores_options_path == ''