diff options
author | Junio C Hamano <gitster@pobox.com> | 2012-09-11 11:09:19 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2012-09-11 11:09:19 -0700 |
commit | 91feb387f2cba906a233c3683cfa5ff2bc32d79a (patch) | |
tree | edcf9d8688543cb64c49a11d6a40e0f2e4212295 /run-command.c | |
parent | 4c3fda0920ef49b323416685ec843d6a12a27b3f (diff) | |
parent | a78550831a42db6896e598cd2a8bfb441a958fc8 (diff) | |
download | git-91feb387f2cba906a233c3683cfa5ff2bc32d79a.tar.gz |
Merge branch 'jc/maint-sane-execvp-notdir' into maint-1.7.11
* jc/maint-sane-execvp-notdir:
sane_execvp(): ignore non-directory on $PATH
Diffstat (limited to 'run-command.c')
-rw-r--r-- | run-command.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/run-command.c b/run-command.c index 606791dc67..f9922b9ecc 100644 --- a/run-command.c +++ b/run-command.c @@ -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; } |