From 7ba57172c176eab990f33bc9de4603ac513eb028 Mon Sep 17 00:00:00 2001 From: Adam David Date: Wed, 14 Aug 1996 18:13:58 +0000 Subject: [PATCH] chown(8) and chgrp(1) directories once only --- usr.sbin/chown/chown.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/usr.sbin/chown/chown.c b/usr.sbin/chown/chown.c index a5ff99edb8c1..f03485799cc2 100644 --- a/usr.sbin/chown/chown.c +++ b/usr.sbin/chown/chown.c @@ -155,11 +155,10 @@ main(argc, argv) 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, chown, continue. */ warnx("%s: %s", p->fts_path, strerror(p->fts_errno)); rval = 1;