From a38044550a5279181778d542b11abaf3ec2b0661 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Tue, 8 Nov 2016 03:53:16 -0600 Subject: Josh Gao pointed out that chmod -R . (and ..) didn't work. --- toys/posix/chmod.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'toys/posix/chmod.c') 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) { -- cgit v1.2.3