summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-23 05:32:26 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-03-23 05:32:26 +0000
commit2c772139b60ddc71d126f42dca37f3c3e5af1caa (patch)
tree0f4e28ce391dda929a2e3f83c1237553668e5519 /win32
parent15265f8be67d3d35c6748481348f47bbea9a75b5 (diff)
* win32/win32.c (rb_w32_spawn): use original command if not found.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c3
1 files changed, 1 insertions, 2 deletions
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);