walk

A re-creation of the 9front utility walk(1) for UNIX
Log | Files | Refs

commit d091dce0ce59130cd14e970f065c3fa6fcae26b0
parent c9650d369f2b7682d7168cb5c2861c99a1818e43
Author: Jacob R. Edwards <n/a>
Date:   Mon,  5 Dec 2022 14:00:19 -0600

Fix -x flag

It did the inverse of what it was suppost to do; it showed
non-executable files.

Diffstat:
Mwalk.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/walk.c b/walk.c @@ -301,7 +301,7 @@ main(int argc, char *argv[]) continue; if (exec) - show = access(ent->fts_accpath, X_OK); + show = access(ent->fts_accpath, X_OK) == 0; else if (type == DIR) show = S_ISDIR(ent->fts_statp->st_mode); else if (type == NOTDIR)