diff options
Diffstat (limited to 'Src')
-rw-r--r-- | Src/hashtable.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Src/hashtable.c b/Src/hashtable.c index 775b6a277..be71a1cc9 100644 --- a/Src/hashtable.c +++ b/Src/hashtable.c @@ -664,7 +664,8 @@ hashdir(char **dirp) * executable plain files. */ if (unset(HASHEXECUTABLESONLY) || - (stat(pathbuf, &statbuf) == 0 && + (access(pathbuf, X_OK) == 0 && + stat(pathbuf, &statbuf) == 0 && S_ISREG(statbuf.st_mode) && (statbuf.st_mode & S_IXUGO))) add = 1; } |