aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-06-16 15:16:08 -0500
committerRob Landley <rob@landley.net>2012-06-16 15:16:08 -0500
commit6ec2178fafa44b2e9d710218db1e9827c1c81857 (patch)
tree5ab6d23527214f32a9b20adb0d7f63007e1dcaac /toys
parent628eb9b22032fb0f2e343f43efa60ec52b01d345 (diff)
downloadtoybox-6ec2178fafa44b2e9d710218db1e9827c1c81857.tar.gz
Add dirtree_parentfd()
Diffstat (limited to 'toys')
-rw-r--r--toys/chmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/chmod.c b/toys/chmod.c
index 2a4e5e3d..e41598c1 100644
--- a/toys/chmod.c
+++ b/toys/chmod.c
@@ -58,7 +58,7 @@ int do_chmod(struct dirtree *try)
printf("chmod '%s' to %04o\n", s, mode);
free(s);
}
- wfchmodat(try->parent ? try->parent->data : AT_FDCWD, try->name, mode);
+ wfchmodat(dirtree_parentfd(try), try->name, mode);
return (toys.optflags & FLAG_R) ? DIRTREE_RECURSE : 0;
}