aboutsummaryrefslogtreecommitdiff
path: root/toys/posix/chmod.c
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2016-11-21 16:47:23 -0600
committerRob Landley <rob@landley.net>2016-11-21 16:47:23 -0600
commit382057f588fbf2c2f7950b85dd317721b8d04c07 (patch)
treeba6b074d5c956f2f5747e27ce0f8ab948a0a602c /toys/posix/chmod.c
parent9b4a67545e11975068d6e16c6872d54e0473e715 (diff)
downloadtoybox-382057f588fbf2c2f7950b85dd317721b8d04c07.tar.gz
Have dirtree_notdotdot() pass through !node->parent so . and .. on the command
line aren't filtered out. Audited all the callers and removed redundant calls, adjusted call sequence, etc. (And let rm _not_ do this, because posix.)
Diffstat (limited to 'toys/posix/chmod.c')
-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 572dff6a..42924399 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 (try->parent && !dirtree_notdotdot(try)) return 0;
+ if (!dirtree_notdotdot(try)) return 0;
mode = string_to_mode(TT.mode, try->st.st_mode);
if (toys.optflags & FLAG_v) {