diff options
author | Rob Landley <rob@landley.net> | 2012-06-01 20:27:51 -0500 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-06-01 20:27:51 -0500 |
commit | 38d3cfb8a38c32111e4bc713396f78ddbb0e5f50 (patch) | |
tree | 8ff7f831ea9e6d8dacecfa192464673b1ae66e9c /toys/chgrp.c | |
parent | 4fa1b32871f661a7e11898b274ec162d52c23ee9 (diff) | |
download | toybox-38d3cfb8a38c32111e4bc713396f78ddbb0e5f50.tar.gz |
Changed my mind about the design again, now callback is dirtree_opennode() and recursion choice is how caller interprets flags.
Diffstat (limited to 'toys/chgrp.c')
-rw-r--r-- | toys/chgrp.c | 4 |
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); |