Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11
* jc/maint-sane-execvp-notdir: sane_execvp(): ignore non-directory on $PATH
This commit is contained in:
@ -139,6 +139,8 @@ int sane_execvp(const char *file, char * const argv[])
|
||||
*/
|
||||
if (errno == EACCES && !strchr(file, '/'))
|
||||
errno = exists_in_PATH(file) ? EACCES : ENOENT;
|
||||
else if (errno == ENOTDIR && !strchr(file, '/'))
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user