summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/spawn.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc8
1 files changed, 3 insertions, 5 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index dc2bb254c..225e1ce0f 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -114,11 +114,9 @@ find_exec (const char *name, path_conv& buf, const char *mywinenv,
/* Return the error condition if this is an absolute path or if there
is no PATH to search. */
- if (strchr (name, '/') || strchr (name, '\\') ||
- isdrive (name) ||
- !(winpath = getwinenv (mywinenv)) ||
- !(path = winpath->get_native ()) ||
- *path == '\0')
+ if (has_slash || strchr (name, '\\') || isdrive (name)
+ || !(winpath = getwinenv (mywinenv))
+ || !(path = winpath->get_native ()) || *path == '\0')
goto errout;
debug_printf ("%s%s", mywinenv, path);