From 390b6df11cc5359679227fe29a6d251b042a3ed7 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Fri, 13 Apr 2007 09:53:43 +0200 Subject: [PATCH] Quote the script name before invoking the interpreter. When the argument vector for the interpreter invocation is assembled, the original arguments were already quoted when necessary, but the script name was not. If the script lives in a directory whose names contains spaces, the interpreter would not find the script. --- compat/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compat/mingw.c b/compat/mingw.c index 595c9956e1..14fabcbbc0 100644 --- a/compat/mingw.c +++ b/compat/mingw.c @@ -279,7 +279,7 @@ static int try_shell_exec(const char *cmd, const char **argv, const char **env) for (n = 0; argv[n];) n++; sh_argv = xmalloc((n+2)*sizeof(char*)); sh_argv[0] = interpr; - sh_argv[1] = cmd; + sh_argv[1] = quote_arg(cmd); quote_argv(&sh_argv[2], &argv[1]); n = spawnvpe(_P_WAIT, interpr, sh_argv, env); if (n == -1)