Skip to content

Commit

Permalink
fix test for glob* function compatibility
Browse files Browse the repository at this point in the history
- not all versions of vim 7.2 support the extra argument for glob*(),
  only those compiled with patch 51
  • Loading branch information
acx0 committed Aug 3, 2012
1 parent 8e9b933 commit 56ee523
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions autoload/vundle/installer.vim
Expand Up @@ -134,7 +134,9 @@ endf

func! vundle#installer#clean(bang) abort
let bundle_dirs = map(copy(g:bundles), 'v:val.path()')
let all_dirs = v:version >= 702 ? split(globpath(g:bundle_dir, '*', 1), "\n") : split(globpath(g:bundle_dir, '*'), "\n")
let all_dirs = (v:version > 702 || (v:version == 702 && has("patch51")))
\ ? split(globpath(g:bundle_dir, '*', 1), "\n")
\ : split(globpath(g:bundle_dir, '*'), "\n")
let x_dirs = filter(all_dirs, '0 > index(bundle_dirs, v:val)')

if empty(x_dirs)
Expand Down Expand Up @@ -187,7 +189,7 @@ endf
func! s:has_doc(rtp) abort
return isdirectory(a:rtp.'/doc')
\ && (!filereadable(a:rtp.'/doc/tags') || filewritable(a:rtp.'/doc/tags'))
\ && v:version >= 702
\ && (v:version > 702 || (v:version == 702 && has("patch51")))
\ ? !(empty(glob(a:rtp.'/doc/*.txt', 1)) && empty(glob(a:rtp.'/doc/*.??x', 1)))
\ : !(empty(glob(a:rtp.'/doc/*.txt')) && empty(glob(a:rtp.'/doc/*.??x')))
endf
Expand Down

0 comments on commit 56ee523

Please sign in to comment.