* dcrt0.cc (quoted): Fix problem where ' quoted strings were skipped.
* fhandler.h (fhandler_socket::~fhandler_socket): Delete declaration. * net.cc: Remove unnecessary "number_of_sockets" usage. (fhandler_socket::fhandler_socket): Ditto. (fhandler_socket::~fhandler_socket): Delete definition. * spawn.cc (spawn_guts): Force first argument passed to CreateProcess as a command line to be windows style.
This commit is contained in:
@@ -312,19 +312,18 @@ quoted (char *cmd, int winshell)
|
||||
return p;
|
||||
}
|
||||
|
||||
const char *s = quote == '\'' ? "'" : "\\\"";
|
||||
/* This must have been run from a Windows shell, so preserve
|
||||
quotes for globify to play with later. */
|
||||
while (*++cmd)
|
||||
if ((p = strpbrk (cmd, "\\\"")) == NULL)
|
||||
while (*cmd && *++cmd)
|
||||
if ((p = strpbrk (cmd, s)) == NULL)
|
||||
{
|
||||
cmd = strchr (cmd, '\0'); // no closing quote
|
||||
break;
|
||||
}
|
||||
else if (quote == '\'')
|
||||
continue;
|
||||
else if (*p == '\\')
|
||||
cmd = ++p;
|
||||
else if (p[1] == quote)
|
||||
else if (quote == '"' && p[1] == '"')
|
||||
{
|
||||
*p = '\\';
|
||||
cmd = ++p; // a quoted quote
|
||||
|
Reference in New Issue
Block a user