aboutsummaryrefslogtreecommitdiff
path: root/bin/chmod/chmod.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/chmod/chmod.c')
-rw-r--r--bin/chmod/chmod.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/bin/chmod/chmod.c b/bin/chmod/chmod.c
index 112915159645..7a843c755bf7 100644
--- a/bin/chmod/chmod.c
+++ b/bin/chmod/chmod.c
@@ -134,8 +134,8 @@ done: argv += optind;
if (argc < 2)
usage();
- fts_options = FTS_PHYSICAL;
if (Rflag) {
+ fts_options = FTS_PHYSICAL;
if (hflag)
errx(1,
"the -R and -h options may not be specified together.");
@@ -145,7 +145,8 @@ done: argv += optind;
fts_options &= ~FTS_PHYSICAL;
fts_options |= FTS_LOGICAL;
}
- }
+ } else
+ fts_options = FTS_LOGICAL;
mode = *argv;
if (*mode >= '0' && *mode <= '7') {