From 81e36c352a8deea54df5ec1e2f4348685569bed2 Mon Sep 17 00:00:00 2001 From: Marco Hinz Date: Sat, 8 May 2021 17:32:00 +0200 Subject: [PATCH] Warn when a symlink loop is detected References https://github.com/mhinz/vim-startify/issues/490 --- autoload/startify.vim | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/autoload/startify.vim b/autoload/startify.vim index 6070b12..3b9867a 100644 --- a/autoload/startify.vim +++ b/autoload/startify.vim @@ -598,7 +598,12 @@ function! s:filter_oldfiles(path_prefix, path_format, use_env) abort continue endif - let absolute_path = fnamemodify(resolve(fname), ":p") + try + let absolute_path = fnamemodify(resolve(fname), ":p") + catch /E655/ " Too many symbolic links (cycle?) + call s:warn('Symlink loop detected! Skipping: '. fname) + continue + endtry " filter duplicates, bookmarks and entries from the skiplist if has_key(entries, absolute_path) \ || !filereadable(absolute_path)