Commits

Anonymous committed 91feb38 Merge

Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11

* jc/maint-sane-execvp-notdir:
sane_execvp(): ignore non-directory on $PATH

Comments (0)

Files changed (1)

 	 */
 	if (errno == EACCES && !strchr(file, '/'))
 		errno = exists_in_PATH(file) ? EACCES : ENOENT;
+	else if (errno == ENOTDIR && !strchr(file, '/'))
+		errno = ENOENT;
 	return -1;
 }