aboutsummaryrefslogtreecommitdiff
path: root/bin/chmod
diff options
context:
space:
mode:
authorAdam David <adam@FreeBSD.org>1996-08-10 15:05:26 +0000
committerAdam David <adam@FreeBSD.org>1996-08-10 15:05:26 +0000
commitf3ad46f409bc8029d89e7abf3ac3eb52f48fed1e (patch)
treea73d8530b1748a23d6869554e212f59b5c81857b /bin/chmod
parentb463077353461be8c09cc1b14f314d7253c469af (diff)
downloadsrc-f3ad46f409bc8029d89e7abf3ac3eb52f48fed1e.tar.gz
src-f3ad46f409bc8029d89e7abf3ac3eb52f48fed1e.zip
chmod(2) directories once only (was twice)
Notes
Notes: svn path=/head/; revision=17496
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 c02994df9bd7..9d461b5e0c1c 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;