* spawn.cc (find_exec): Use has_slash to determine if path has a slash rather
than calculating this twice.
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user