Skip to content

Commit

Permalink
Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11
Browse files Browse the repository at this point in the history
* jc/maint-sane-execvp-notdir:
  sane_execvp(): ignore non-directory on $PATH
  • Loading branch information
Junio C Hamano committed Sep 11, 2012
2 parents 4c3fda0 + a785508 commit 91feb38
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions run-command.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 91feb38

Please sign in to comment.