changeset 1426:23169562c3ee draft

More find bugfixes.
author Rob Landley <rob@landley.net>
date Tue, 05 Aug 2014 23:21:18 -0500
parents 2cf6ce96d442
children 0d58119f0bcd
files toys/posix/find.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/toys/posix/find.c	Tue Aug 05 19:44:59 2014 -0500
+++ b/toys/posix/find.c	Tue Aug 05 23:21:18 2014 -0500
@@ -263,6 +263,7 @@
       }
     } 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 @@
   TT.filter = toys.optargs+len;
 
   // use "." if no paths
-  if (!*ss || **ss == '-') {
+  if (!len) {
     ss = (char *[]){"."};
     len = 1;
   }