Permalink
Browse files

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

* jc/maint-sane-execvp-notdir:
  sane_execvp(): ignore non-directory on $PATH
  • Loading branch information...
2 parents 4c3fda0 + a785508 commit 91feb387f2cba906a233c3683cfa5ff2bc32d79a @gitster gitster committed Sep 11, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 run-command.c
View
@@ -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;
}

0 comments on commit 91feb38

Please sign in to comment.