mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (rb_w32_spawn): deals with quoted commands.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@20945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6fcaf92943
commit
7c152e7f08
2 changed files with 12 additions and 0 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Dec 23 19:51:24 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (rb_w32_spawn): deals with quoted commands.
|
||||
|
||||
Tue Dec 23 18:44:21 2008 Tanaka Akira <akr@fsij.org>
|
||||
|
||||
* strftime.c (rb_strftime): use locale insensitive functions for tr_TR
|
||||
|
|
|
@ -918,6 +918,13 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog)
|
|||
}
|
||||
else {
|
||||
int len = 0;
|
||||
if (*cmd == '"') {
|
||||
for (prog = cmd + 1; *prog && *prog != '"'; prog = CharNext(prog));
|
||||
len = prog - cmd - 1;
|
||||
STRNDUPA(p, cmd + 1, len);
|
||||
p = dln_find_exe_r(p, NULL, fbuf, sizeof(fbuf));
|
||||
if (p) goto command_found;
|
||||
}
|
||||
for (prog = cmd; *prog; prog = CharNext(prog)) {
|
||||
if (ISSPACE(*prog)) {
|
||||
len = prog - cmd;
|
||||
|
@ -955,6 +962,7 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog)
|
|||
}
|
||||
}
|
||||
if (p) {
|
||||
command_found:
|
||||
shell = p;
|
||||
translate_char(p, '/', '\\');
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue