Skip to content

Commit 91feb38

Browse files
committed
Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11
* jc/maint-sane-execvp-notdir: sane_execvp(): ignore non-directory on $PATH
2 parents 4c3fda0 + a785508 commit 91feb38

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

run-command.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ int sane_execvp(const char *file, char * const argv[])
139139
*/
140140
if (errno == EACCES && !strchr(file, '/'))
141141
errno = exists_in_PATH(file) ? EACCES : ENOENT;
142+
else if (errno == ENOTDIR && !strchr(file, '/'))
143+
errno = ENOENT;
142144
return -1;
143145
}
144146

0 commit comments

Comments
 (0)