summaryrefslogtreecommitdiffstats
path: root/bin/chmod/chmod.c
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-06-09 19:14:27 +0000
committerdim <dim@FreeBSD.org>2015-06-09 19:14:27 +0000
commit6370dd4a2cfcd7b1e323f780f34523097a892d0c (patch)
tree16a54540a7fb71a7c91fd866ad2437410acbf587 /bin/chmod/chmod.c
parent8c2b6d93700b452fac3cadba57de1b18a783ec92 (diff)
parent8fbb8a1dd51626b81ee23212d3001e3908ff17c4 (diff)
downloadFreeBSD-src-6370dd4a2cfcd7b1e323f780f34523097a892d0c.zip
FreeBSD-src-6370dd4a2cfcd7b1e323f780f34523097a892d0c.tar.gz
Merged ^/head r283871 through r284187.
Diffstat (limited to 'bin/chmod/chmod.c')
-rw-r--r--bin/chmod/chmod.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c
index 9b80157..2ccce2d 100644
--- a/bin/chmod/chmod.c
+++ b/bin/chmod/chmod.c
@@ -162,14 +162,16 @@ done: argv += optind;
atflag = AT_SYMLINK_NOFOLLOW;
switch (p->fts_info) {
- case FTS_D: /* Change it at FTS_DP. */
+ case FTS_D:
if (!Rflag)
fts_set(ftsp, p, FTS_SKIP);
- continue;
+ break;
case FTS_DNR: /* Warn, chmod. */
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
break;
+ case FTS_DP: /* Already changed at FTS_D. */
+ continue;
case FTS_ERR: /* Warn, continue. */
case FTS_NS:
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
OpenPOWER on IntegriCloud