aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-01-02 14:34:53 -0600
committerRob Landley <rob@landley.net>2016-01-02 14:34:53 -0600
commit3d33dd80f8cb931e293d7f64c44bc357fec11120 (patch)
treeec77ed4ce62cb33b45a2a834ffc3c37c4ceda242
parentaa784b09a9fbbbd571130051405edeaea7c9b510 (diff)
downloadtoybox-3d33dd80f8cb931e293d7f64c44bc357fec11120.tar.gz
Fix find --prune.
-rw-r--r--toys/posix/find.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c
index 767b4009..94179cb3 100644
--- a/toys/posix/find.c
+++ b/toys/posix/find.c
@@ -61,7 +61,7 @@ GLOBALS(
// None of this can go in TT because you can have more than one -exec
struct exec_range {
- char *next, *prev;
+ char *next, *prev; // layout compatible with struct double_list
int dir, plus, arglen, argsize, curly, namecount;
char **argstart;
@@ -248,7 +248,7 @@ static int do_find(struct dirtree *new)
} else if (!strcmp(s, "nogroup")) {
if (check) if (getgrgid(new->st.st_gid)) test = 0;
} else if (!strcmp(s, "prune")) {
- if (check && S_ISDIR(new->st.st_dev) && !TT.depth) recurse = 0;
+ if (check && S_ISDIR(new->st.st_mode) && !TT.depth) recurse = 0;
// Remaining filters take an argument
} else {