diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-23 05:32:26 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-03-23 05:32:26 +0000 |
commit | aceeeae649abe59b32912eb1ec972c61bf21f52f (patch) | |
tree | 0f4e28ce391dda929a2e3f83c1237553668e5519 /win32 | |
parent | 403d91a99aa63f9e8e037a4c97fe07886a00b4a2 (diff) | |
download | ruby-aceeeae649abe59b32912eb1ec972c61bf21f52f.tar.gz ruby-aceeeae649abe59b32912eb1ec972c61bf21f52f.tar.xz ruby-aceeeae649abe59b32912eb1ec972c61bf21f52f.zip |
* win32/win32.c (rb_w32_spawn): use original command if not found.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@23036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/win32.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/win32/win32.c b/win32/win32.c index 5ffe59807..90e725042 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); |