Bug fix: Parse . and .. from path string with trailing slash. (#899)

This commit is contained in:
Phil Runninger
2018-10-24 22:14:18 -04:00
committed by GitHub
parent 52151fb307
commit 92a20c0736

View File

@@ -304,9 +304,11 @@ function! s:TreeDirNode._glob(pattern, all)
for l:file in l:globList
let l:tail = fnamemodify(l:file, ':t')
" Double the modifier if only a separator was stripped.
" If l:file has a trailing slash, then its :tail will be ''. Use
" :h to drop the slash and the empty string after it; then use :t
" to get the directory name.
if l:tail == ''
let l:tail = fnamemodify(l:file, ':t:t')
let l:tail = fnamemodify(l:file, ':h:t')
endif
if l:tail == '.' || l:tail == '..'