From c39a337101de8613e71c5c474feb54297cce5eaa Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 5 Aug 2014 23:21:18 -0500 Subject: More find bugfixes. --- toys/posix/find.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'toys/posix') diff --git a/toys/posix/find.c b/toys/posix/find.c index 8cacc71e..051c2702 100644 --- a/toys/posix/find.c +++ b/toys/posix/find.c @@ -263,6 +263,7 @@ static int do_find(struct dirtree *new) } } else if (!strcmp(s, "not")) { if (check) not = !not; + continue; // Mostly ignore NOP argument } else if (!strcmp(s, "a") || !strcmp(s, "and")) { if (not) goto error; @@ -504,7 +505,7 @@ void find_main(void) TT.filter = toys.optargs+len; // use "." if no paths - if (!*ss || **ss == '-') { + if (!len) { ss = (char *[]){"."}; len = 1; } -- cgit v1.2.3