aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/find.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/find.c')
-rw-r--r--toys/posix/find.c9
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);