aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/chgrp.c
diff options
context:
space:
mode:
Diffstat (limited to 'toys/posix/chgrp.c')
-rw-r--r--toys/posix/chgrp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/chgrp.c b/toys/posix/chgrp.c
index c53ea21d..24af46ac 100644
--- a/toys/posix/chgrp.c
+++ b/toys/posix/chgrp.c
@@ -44,7 +44,7 @@ static int do_chgrp(struct dirtree *node)
// Depth first search
if (!dirtree_notdotdot(node)) return 0;
- if ((flags & FLAG_R) && node->data != -1 && S_ISDIR(node->st.st_mode))
+ if ((flags & FLAG_R) && !node->again && S_ISDIR(node->st.st_mode))
return DIRTREE_COMEAGAIN|((flags&FLAG_L) ? DIRTREE_SYMFOLLOW : 0);
fd = dirtree_parentfd(node);