summaryrefslogtreecommitdiffstats
path: root/bin/chmod
diff options
context:
space:
mode:
authoradam <adam@FreeBSD.org>1996-08-10 15:05:26 +0000
committeradam <adam@FreeBSD.org>1996-08-10 15:05:26 +0000
commit5728bddcc9fb512bb3a0cd3f08c0c92f31004175 (patch)
treea73d8530b1748a23d6869554e212f59b5c81857b /bin/chmod
parent08f9d454e02de3df6c4a926fc9dbbce05efbbce0 (diff)
downloadFreeBSD-src-5728bddcc9fb512bb3a0cd3f08c0c92f31004175.zip
FreeBSD-src-5728bddcc9fb512bb3a0cd3f08c0c92f31004175.tar.gz
chmod(2) directories once only (was twice)
Diffstat (limited to 'bin/chmod')
-rw-r--r--bin/chmod/chmod.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c
index c02994d..9d461b5 100644
--- a/bin/chmod/chmod.c
+++ b/bin/chmod/chmod.c
@@ -30,7 +30,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: chmod.c,v 1.3 1995/02/03 22:21:09 bde Exp $
+ * $Id: chmod.c,v 1.4 1995/03/19 13:27:43 joerg Exp $
*/
#ifndef lint
@@ -161,11 +161,10 @@ done: argv += optind;
err(1, NULL);
for (rval = 0; (p = fts_read(ftsp)) != NULL;) {
switch (p->fts_info) {
- case FTS_D:
- if (Rflag) /* Change it at FTS_DP. */
- continue;
- fts_set(ftsp, p, FTS_SKIP);
- break;
+ case FTS_D: /* Change it at FTS_DP. */
+ if (!Rflag)
+ fts_set(ftsp, p, FTS_SKIP);
+ continue;
case FTS_DNR: /* Warn, chmod, continue. */
warnx("%s: %s", p->fts_path, strerror(p->fts_errno));
rval = 1;
OpenPOWER on IntegriCloud