1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-24 07:40:52 +00:00

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:
Tim J. Robbins 2002-06-30 06:02:39 +00:00
parent 8c821782f8
commit 721da592c4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=99120

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) {