mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-19 11:31:26 +01:00
30184: use a HASH_EXECUTABLES_ONLY test that matches the test used by
exec.c:iscom() during path search.
This commit is contained in:
parent
b227ff16da
commit
30361b650c
1 changed files with 2 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue