Disallow using standard Vim plugin directory as plug home

Close #646
This commit is contained in:
Junegunn Choi
2017-06-27 17:44:12 +09:00
parent 802b100415
commit 449b4f1ed6
3 changed files with 13 additions and 1 deletions

View File

@@ -121,6 +121,9 @@ function! plug#begin(...)
else
return s:err('Unable to determine plug home. Try calling plug#begin() with a path argument.')
endif
if fnamemodify(home, ':t') ==# 'plugin' && fnamemodify(home, ':h') ==# s:first_rtp
return s:err('Invalid plug home. '.home.' is a standard Vim runtime path and is not allowed.')
endif
let g:plug_home = home
let g:plugs = {}