summaryrefslogtreecommitdiff
path: root/run-command.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-09-11 11:23:45 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-09-11 11:23:54 -0700
commit1c88a6d17492b197b9b3298cbc34efa804928302 (patch)
treeb0370caa6322930a13898673c5a559aef20c8791 /run-command.c
parentMerge branch 'js/use-sc-open-max' into maint (diff)
parentGit 1.7.11.6 (diff)
downloadtgif-1c88a6d17492b197b9b3298cbc34efa804928302.tar.xz
Sync with 1.7.11.6
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'run-command.c')
-rw-r--r--run-command.c2
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;
}