From f5bb40260b4c7ee7fa15e7b0c43ac12cd0da9ad7 Mon Sep 17 00:00:00 2001 From: Marwan Al Jubeh Date: Tue, 12 Aug 2014 00:08:46 +0300 Subject: [PATCH] Fix Windows relative paths Submodule paths must be in the form bundle/plugin. If a submodule is added with the path as bundle/\plugin 'git submodule init' will fail. --- autoload/vundle/installer.vim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index cda8914..db25980 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -278,7 +278,9 @@ func! vundle#installer#relative_path(bundle) abort let cmd = vundle#installer#shellesc_cd(cmd) let prefix = s:strip(s:system(cmd)) let pattern = '\V'.substitute(g:bundle_dir, '\\', '\\\\', 'g') - return prefix.substitute(a:bundle.path(), pattern, '', '') + let suffix = substitute(a:bundle.path(), pattern, '', '') + let suffix = substitute(suffix, '^\\', '', '') + return prefix.suffix endf " ---------------------------------------------------------------------------