aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
Diffstat (limited to 'toys')
-rw-r--r--toys/chgrp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/toys/chgrp.c b/toys/chgrp.c
index 935e1781..521db0b7 100644
--- a/toys/chgrp.c
+++ b/toys/chgrp.c
@@ -42,8 +42,8 @@ static int do_chgrp(struct dirtree *node)
{
int ret, flags = toys.optflags;
- ret = dirtree_comeagain(node, flags & FLAG_R);
- if (!ret || ret == DIRTREE_COMEAGAIN) return ret;
+ ret = dirtree_opennode(node);
+ if (!ret || ((flags & FLAG_R) && ret == DIRTREE_COMEAGAIN)) return ret;
if (node->extra != -1) ret = fchown(node->extra, -1, TT.group);