aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2014-08-05 23:21:18 -0500
committerRob Landley <rob@landley.net>2014-08-05 23:21:18 -0500
commitc39a337101de8613e71c5c474feb54297cce5eaa (patch)
tree7c0529e897b4c992d3ba7e814f078f4928195fa9 /toys/posix
parent5e4787ea3144364983944c38eb2a5ab2f12351bc (diff)
downloadtoybox-c39a337101de8613e71c5c474feb54297cce5eaa.tar.gz
More find bugfixes.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/find.c3
1 files changed, 2 insertions, 1 deletions
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;
}