Index: spawn.cc =================================================================== RCS file: /cvs/src/src/winsup/cygwin/spawn.cc,v retrieving revision 1.288 diff -u -r1.288 spawn.cc --- spawn.cc 25 Jan 2010 11:21:56 -0000 1.288 +++ spawn.cc 9 Mar 2010 00:20:54 -0000 @@ -112,15 +112,16 @@ char *tmp = tp.c_get (); const char *posix = (opt & FE_NATIVE) ? NULL : name; bool has_slash = strchr (name, '/'); + bool has_backslash = strchr (name, '\\'); int err; /* Check to see if file can be opened as is first. Win32 systems always check . first, but PATH may not be set up to do this. */ - if ((has_slash || opt & FE_CWD) + if ((has_slash || has_backslash || opt & FE_CWD) && (suffix = perhaps_suffix (name, buf, err, opt)) != NULL) { - if (posix && !has_slash) + if (posix && !has_slash && !has_backslash) { tmp[0] = '.'; tmp[1] = '/'; @@ -147,7 +148,7 @@ path = s; posix_path = mywinenv - 1; } - else if (has_slash || strchr (name, '\\') || isdrive (name) + else if (has_slash || has_backslash || isdrive (name) || !(winpath = getwinenv (mywinenv)) || !(path = winpath->get_native ()) || *path == '\0') /* Return the error condition if this is an absolute path or if there