From 484d560485b974cf1c600443eb4aa148b8274eb9 Mon Sep 17 00:00:00 2001 From: Marwan Al Jubeh Date: Mon, 11 Aug 2014 23:48:21 +0300 Subject: [PATCH] Fix vundle#installer#relative_path Escape \ in paths in order to match the bundle path part correctly on Windows. --- autoload/vundle/installer.vim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 84eb0a1..cda8914 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -277,7 +277,8 @@ func! vundle#installer#relative_path(bundle) abort let cmd = 'cd '.vundle#installer#shellesc(g:bundle_dir).' && git rev-parse --show-prefix' let cmd = vundle#installer#shellesc_cd(cmd) let prefix = s:strip(s:system(cmd)) - return prefix.substitute(a:bundle.path(), g:bundle_dir, '', '') + let pattern = '\V'.substitute(g:bundle_dir, '\\', '\\\\', 'g') + return prefix.substitute(a:bundle.path(), pattern, '', '') endf " ---------------------------------------------------------------------------