Handle relative and absolute pathnames (anything with a `/' in it) in the same

way as execve(2), and the old perl which(1).

PR:		35718
This commit is contained in:
tjr 2002-06-30 06:02:39 +00:00
parent 825f2f17f4
commit 5edd8af490

View File

@ -129,7 +129,7 @@ print_matches(char *path, char *filename)
const char *d;
int found;
if (*filename == '/')
if (strchr(filename, '/') != NULL)
return (is_there(filename) ? 0 : -1);
found = 0;
while ((d = strsep(&path, ":")) != NULL) {