summaryrefslogtreecommitdiff
path: root/src/channel.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2016-03-12 15:58:34 +0100
committerBram Moolenaar <Bram@vim.org>2016-03-12 15:58:34 +0100
commit583c1f14a4e1d89fe029b1c134d405357468ece7 (patch)
tree6207d6f2f6a6535656f6f49e5aae0e3786721658 /src/channel.c
parent5a6ec52392b78d41153660d0353d5b86a2dc583c (diff)
downloadvim-583c1f14a4e1d89fe029b1c134d405357468ece7.zip
patch 7.4.1544
Problem: On Win32 escaping the command does not work properly. Solution: Reset 'ssl' when escaping the command. (Yasuhiro Matsumoto)
Diffstat (limited to 'src/channel.c')
-rw-r--r--src/channel.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/channel.c b/src/channel.c
index 8f70da276..99f053a2f 100644
--- a/src/channel.c
+++ b/src/channel.c
@@ -3625,7 +3625,17 @@ job_start(typval_T *argvars)
/* Only escape when needed, double quotes are not always allowed. */
if (li != l->lv_first && vim_strpbrk(s, (char_u *)" \t\"") != NULL)
{
+# ifdef WIN32
+ int old_ssl = p_ssl;
+
+ /* This is using CreateProcess, not cmd.exe. Always use
+ * double quote and backslashes. */
+ p_ssl = 0;
+# endif
s = vim_strsave_shellescape(s, FALSE, TRUE);
+# ifdef WIN32
+ p_ssl = old_ssl;
+# endif
if (s == NULL)
goto theend;
ga_concat(&ga, s);