aboutsummaryrefslogtreecommitdiff
path: root/toys
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-11-08 03:53:16 -0600
committerRob Landley <rob@landley.net>2016-11-08 03:53:16 -0600
commita38044550a5279181778d542b11abaf3ec2b0661 (patch)
treee94e7d5dc069217d86804fb1b5bb61e215262aa4 /toys
parent45058fb2735dd5a81a6bd224e35bb34044a02ce5 (diff)
downloadtoybox-a38044550a5279181778d542b11abaf3ec2b0661.tar.gz
Josh Gao pointed out that chmod -R . (and ..) didn't work.
Diffstat (limited to 'toys')
-rw-r--r--toys/posix/chmod.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toys/posix/chmod.c b/toys/posix/chmod.c
index 42924399..572dff6a 100644
--- a/toys/posix/chmod.c
+++ b/toys/posix/chmod.c
@@ -43,7 +43,7 @@ static int do_chmod(struct dirtree *try)
{
mode_t mode;
- if (!dirtree_notdotdot(try)) return 0;
+ if (try->parent && !dirtree_notdotdot(try)) return 0;
mode = string_to_mode(TT.mode, try->st.st_mode);
if (toys.optflags & FLAG_v) {