diff options
Diffstat (limited to 'toys/posix/chgrp.c')
-rw-r--r-- | toys/posix/chgrp.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/toys/posix/chgrp.c b/toys/posix/chgrp.c index ed2ff9b2..802d8f8f 100644 --- a/toys/posix/chgrp.c +++ b/toys/posix/chgrp.c @@ -71,7 +71,7 @@ static int do_chgrp(struct dirtree *node) void chgrp_main(void) { - int ischown = toys.which->name[2] == 'o'; + int ischown = toys.which->name[2] == 'o', hl = toys.optflags&(FLAG_H|FLAG_L); char **s, *own; // Distinguish chown from chgrp @@ -103,8 +103,7 @@ void chgrp_main(void) } for (s=toys.optargs+1; *s; s++) { - struct dirtree *new = dirtree_add_node(AT_FDCWD, *s, - toys.optflags&(FLAG_H|FLAG_L)); + struct dirtree *new = dirtree_add_node(0, *s, hl); if (new) handle_callback(new, do_chgrp); else toys.exitval = 1; } |