From 3d33dd80f8cb931e293d7f64c44bc357fec11120 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sat, 2 Jan 2016 14:34:53 -0600 Subject: Fix find --prune. --- toys/posix/find.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'toys') 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 { -- cgit v1.2.3