diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | win32/win32.c | 3 |
2 files changed, 5 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Mon Mar 23 14:32:23 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> + + * win32/win32.c (rb_w32_spawn): use original command if not found. + Mon Mar 23 06:51:16 2009 Nobuyoshi Nakada <nobu@ruby-lang.org> * enc/depend (link_so): replaces $(TARGET) with basename of the diff --git a/win32/win32.c b/win32/win32.c index 5ffe59807e..90e7250426 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -1055,7 +1055,6 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog) } else { int len = 0, quote = (*cmd == '"') ? '"' : 0; - const char *comspec = shell; for (prog = cmd + !!quote;; prog = CharNext(prog)) { if (!*prog) { len = prog - cmd; @@ -1078,7 +1077,7 @@ rb_w32_spawn(int mode, const char *cmd, const char *prog) } shell = dln_find_exe_r(shell, NULL, fbuf, sizeof(fbuf)); if (!shell) { - shell = comspec; + shell = p ? p : cmd; } else { len = strlen(shell); |