Skip to content

Commit 81e36c3

Browse files
committed
Warn when a symlink loop is detected
References #490
1 parent df0f1db commit 81e36c3

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

autoload/startify.vim

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,12 @@ function! s:filter_oldfiles(path_prefix, path_format, use_env) abort
598598
continue
599599
endif
600600

601-
let absolute_path = fnamemodify(resolve(fname), ":p")
601+
try
602+
let absolute_path = fnamemodify(resolve(fname), ":p")
603+
catch /E655/ " Too many symbolic links (cycle?)
604+
call s:warn('Symlink loop detected! Skipping: '. fname)
605+
continue
606+
endtry
602607
" filter duplicates, bookmarks and entries from the skiplist
603608
if has_key(entries, absolute_path)
604609
\ || !filereadable(absolute_path)

0 commit comments

Comments
 (0)