aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/find.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2019-09-04 15:53:41 -0500
committerRob Landley <rob@landley.net>2019-09-04 15:53:41 -0500
commit5be1c0ff22b55887b4d82c2cbbff79d9b5f45791 (patch)
tree289031162b9e64d7984f4c30ea37e4100ae6dacd /toys/posix/find.c
parent09bab92d4ac3d9d586d9b0cca0635743f483e12c (diff)
downloadtoybox-5be1c0ff22b55887b4d82c2cbbff79d9b5f45791.tar.gz
DIRTREE_STATLESS doesn't have to test 3 stat fields, it sets a flag
Diffstat (limited to 'toys/posix/find.c')
-rw-r--r--toys/posix/find.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/find.c b/toys/posix/find.c
index 02fdf3c4..3317448a 100644
--- a/toys/posix/find.c
+++ b/toys/posix/find.c
@@ -217,7 +217,7 @@ static int do_find(struct dirtree *new)
// skip . and .. below topdir, handle -xdev and -depth
if (new) {
// Handle stat failures first.
- if (!new->st.st_blksize && !new->st.st_dev && !new->st.st_ino) {
+ if (new->again&2) {
if (!new->parent || errno != ENOENT) {
perror_msg("'%s'", s = dirtree_path(new, 0));
free(s);