Fix wget/win32 codepath for script searching.

The codepath does not appear to have been tested; mv on Win32 is move,
and substitute has 4 arguments instead of 3.
This commit is contained in:
Zeux 2012-07-06 13:48:52 +04:00
parent d9e2f79ee8
commit 1a935a259b

View File

@ -163,7 +163,7 @@ func! s:fetch_scripts(to)
let temp = shellescape(tempname()) let temp = shellescape(tempname())
let cmd = 'wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv -f '.temp.' '.shellescape(a:to) let cmd = 'wget -q -O '.temp.' '.l:vim_scripts_json. ' && mv -f '.temp.' '.shellescape(a:to)
if (has('win32') || has('win64')) if (has('win32') || has('win64'))
let cmd = substitute(cmd, 'mv -f ', 'mv /Y ') " change force flag let cmd = substitute(cmd, 'mv -f ', 'move /Y ', '') " change force flag
let cmd = '"'.cmd.'"' " enclose in quotes so && joined cmds work let cmd = '"'.cmd.'"' " enclose in quotes so && joined cmds work
end end
else else