mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
*Functions4U: Fix bug detected by biobytes
git-svn-id: svn://ultimatepp.org/upp/trunk@9695 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
ef8bd1fc02
commit
387e9bea8b
1 changed files with 4 additions and 7 deletions
|
|
@ -132,13 +132,10 @@ bool LocalProcess2::DoStart(const char *_command, const Vector<String> *arg, boo
|
|||
if(*s == '\0') {
|
||||
command.Cat('\\', 2 * num_backslashes);
|
||||
break;
|
||||
}
|
||||
else
|
||||
if(*s == '\"') {
|
||||
} else if(*s == '\"') {
|
||||
command.Cat('\\', 2 * num_backslashes + 1);
|
||||
command << '\"';
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
command.Cat('\\', num_backslashes);
|
||||
command.Cat(*s);
|
||||
}
|
||||
|
|
@ -148,14 +145,14 @@ bool LocalProcess2::DoStart(const char *_command, const Vector<String> *arg, boo
|
|||
}
|
||||
}
|
||||
}
|
||||
WStringBuffer wscmd(ToSystemCharsetW(command));
|
||||
WString wscmd(ToSystemCharsetW(command));
|
||||
WString wsdir(ToSystemCharsetW(dir));
|
||||
const wchar *wdir;
|
||||
if (dir == 0)
|
||||
wdir = 0;
|
||||
else
|
||||
wdir = wsdir;
|
||||
bool h = CreateProcessW(NULL, wscmd, &sa, &sa, TRUE, NORMAL_PRIORITY_CLASS, (void *)envptr, wdir, &si, &pi);
|
||||
bool h = CreateProcessW(NULL, WStringBuffer(wscmd), &sa, &sa, TRUE, NORMAL_PRIORITY_CLASS, (void *)envptr, wdir, &si, &pi);
|
||||
LLOG("CreateProcess " << (h ? "succeeded" : "failed"));
|
||||
CloseHandle(hErrorWrite);
|
||||
CloseHandle(hInputRead);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue