diff options
author | Rob Landley <rob@landley.net> | 2015-05-09 18:11:22 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2015-05-09 18:11:22 -0500 |
commit | aab9164df395a4b0878b0ad930a5ec8a806a58e9 (patch) | |
tree | ae36c520e5ebeaf616755792f67c9e09ff1bbf9f /toys/posix/find.c | |
parent | a913d92bad6550e005a3ffac71a82586042171b5 (diff) | |
download | toybox-aab9164df395a4b0878b0ad930a5ec8a806a58e9.tar.gz |
Add DIRTREE_SHUTUP to disable dirtree warnings if file vanishes out from
under traversal. Pass through full flag set in dirtree_add_node(), add
dirtree_start() wrapper to provide symlink-only behavior (avoiding a lot
of DIRTREE_SYMFOLLOW*!!(logic) repeated in callers).
Diffstat (limited to 'toys/posix/find.c')
-rw-r--r-- | toys/posix/find.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c index 69e370d4..73502b4a 100644 --- a/toys/posix/find.c +++ b/toys/posix/find.c @@ -531,12 +531,9 @@ void find_main(void) do_find(0); // Loop through paths - for (i = 0; i < len; i++) { - struct dirtree *new; - - new = dirtree_add_node(0, ss[i], toys.optflags&(FLAG_H|FLAG_L)); - if (new) dirtree_handle_callback(new, do_find); - } + for (i = 0; i < len; i++) + dirtree_handle_callback(dirtree_start(ss[i], toys.optflags&(FLAG_H|FLAG_L)), + do_find); if (CFG_TOYBOX_FREE) { close(TT.topdir); |