# HG changeset patch # User Mark Woods # Date 1659547376 -3600 # Node ID 8ddbcbfa57b2440d107e8f41be45448215986058 # Parent b094a03a8115a9f512d4562518ffe774735ef8e9 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. diff -r b094a03a8115 -r 8ddbcbfa57b2 autoload/gutentags/ctags.vim --- 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 == ''