walk

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

commit 4ffe035822b41f6aa37479a566c47a1fc95c7288
parent 615771b7133324240e4aba669c273dbb9ef541cd
Author: Jacob R. Edwards <n/a>
Date:   Mon,  5 Dec 2022 12:57:44 -0600

Utilize the ability to not set SEEDOT

I had thought it was for all "hidden" (dot-prefixed) files, but
it's only for . and .., which I ignored anyway.

Diffstat:
Mwalk.c | 5+----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/walk.c b/walk.c @@ -259,7 +259,7 @@ main(int argc, char *argv[]) offset = 2; argv = (char *[]){ ".", NULL }; } - fts = fts_open(argv, FTS_PHYSICAL | FTS_SEEDOT, NULL); + fts = fts_open(argv, FTS_PHYSICAL, NULL); if (!fts) die("fts open"); @@ -274,9 +274,6 @@ main(int argc, char *argv[]) continue; } - if (strcmp(ent->fts_name, ".") == 0 || strcmp(ent->fts_name, "..") == 0) - continue; - depth = ent->fts_level - 1; if (max >= 0 && depth > max) continue;