1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-11 02:16:16 +02:00

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:
Junio C Hamano 2012-09-11 11:09:19 -07:00
commit 91feb387f2

View File

@ -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;
}