From 37eba9825cd374006bc7da15c32bb0f69e7b1b22 Mon Sep 17 00:00:00 2001 From: Brad Anderson Date: Wed, 30 Mar 2011 00:55:53 -0600 Subject: [PATCH] Make :BundleClean work on Windows --- autoload/vundle/installer.vim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/autoload/vundle/installer.vim b/autoload/vundle/installer.vim index 718d07a..11c668f 100644 --- a/autoload/vundle/installer.vim +++ b/autoload/vundle/installer.vim @@ -30,7 +30,11 @@ func! vundle#installer#clean(bang) if (!empty(x_dirs)) " TODO: improve message if (a:bang || input('Are you sure you want to remove '.len(x_dirs).' bundles?') =~? 'y') - exec '!rm -rf '.join(map(x_dirs, 'shellescape(v:val)'), ' ') + if has('win32') || has('win64') + exec '!rmdir /S /Q '.join(map(x_dirs, 'shellescape(v:val)'), ' ') + else + exec '!rm -rf '.join(map(x_dirs, 'shellescape(v:val)'), ' ') + endif endif end endf