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:
parent
825f2f17f4
commit
5edd8af490
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user