ruby-changes:9407
From: nobu <ko1@a...>
Date: Tue, 23 Dec 2008 19:51:42 +0900 (JST)
Subject: [ruby-changes:9407] Ruby:r20945 (trunk): * win32/win32.c (rb_w32_spawn): deals with quoted commands.
nobu 2008-12-23 19:51:27 +0900 (Tue, 23 Dec 2008) New Revision: 20945 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=20945 Log: * win32/win32.c (rb_w32_spawn): deals with quoted commands. Modified files: trunk/ChangeLog trunk/win32/win32.c Index: ChangeLog =================================================================== --- ChangeLog (revision 20944) +++ ChangeLog (revision 20945) @@ -1,3 +1,7 @@ +Tue Dec 23 19:51:24 2008 Nobuyoshi Nakada <nobu@r...> + + * win32/win32.c (rb_w32_spawn): deals with quoted commands. + Tue Dec 23 18:44:21 2008 Tanaka Akira <akr@f...> * strftime.c (rb_strftime): use locale insensitive functions for tr_TR Index: win32/win32.c =================================================================== --- win32/win32.c (revision 20944) +++ win32/win32.c (revision 20945) @@ -918,6 +918,13 @@ } 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 @@ } } if (p) { + command_found: shell = p; translate_char(p, '/', '\\'); } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/