Strip trailing slash from g:plug_home

This commit is contained in:
Junegunn Choi
2013-10-14 12:51:53 +09:00
parent 3e65d146ad
commit 23748f115f
2 changed files with 26 additions and 10 deletions

View File

@@ -58,8 +58,9 @@ let s:is_win = has('win32') || has('win64')
let s:me = expand('<sfile>:p')
function! plug#begin(...)
let home = a:0 > 0 ? fnamemodify(a:1, ':p') :
\ get(g:, 'plug_home', split(&rtp, ',')[0].'/plugged')
let home = s:path(
\ a:0 > 0 ? fnamemodify(a:1, ':p') :
\ get(g:, 'plug_home', split(&rtp, ',')[0].'/plugged'))
if !isdirectory(home)
try
call mkdir(home, 'p')