mirror of
https://github.com/reactos/reactos.git
synced 2025-01-05 13:59:25 +00:00
[CMD]
Fix first argument of the target program so that paths with spaces aren't reparsed by the c runtime as multiple arguments. svn path=/trunk/; revision=56716
This commit is contained in:
parent
592fd1b680
commit
17c51a305d
1 changed files with 4 additions and 1 deletions
|
@ -396,7 +396,10 @@ Execute (LPTSTR Full, LPTSTR First, LPTSTR Rest, PARSED_COMMAND *Cmd)
|
|||
STARTUPINFO stui;
|
||||
|
||||
/* build command line for CreateProcess(): FullName + " " + rest */
|
||||
_tcscpy(szFullCmdLine, szFullName);
|
||||
BOOL quoted = !!_tcschr(First, ' ');
|
||||
_tcscpy(szFullCmdLine, quoted ? _T("\"") : _T(""));
|
||||
_tcsncat(szFullCmdLine, First, CMDLINE_LENGTH - _tcslen(szFullCmdLine));
|
||||
_tcsncat(szFullCmdLine, quoted ? _T("\"") : _T(""), CMDLINE_LENGTH - _tcslen(szFullCmdLine));
|
||||
|
||||
if (*rest)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue