aboutsummaryrefslogtreecommitdiff
path: root/bin/cp/cp.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/cp/cp.c')
-rw-r--r--bin/cp/cp.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c
index 15b418931f64..19faa2899613 100644
--- a/bin/cp/cp.c
+++ b/bin/cp/cp.c
@@ -331,20 +331,20 @@ copy(argv, type, fts_options)
if (curr->fts_info == FTS_DP) {
/*
- * We are finished with this directory. If we didn't
- * copy it, or otherwise don't need to change its
- * attributes, then we are done.
+ * We are nearly finished with this directory. If we
+ * didn't actually copy it, or otherwise don't need to
+ * change its attributes, then we are done.
*/
if (!curr->fts_number)
continue;
/*
* If -p is in effect, set all the attributes.
* Otherwise, set the correct permissions, limited
- * by the umask. The permissions are often correct
- * when the directory is initial made, and we can
- * avoid a chmod(). Note that mkdir() does not honour
- * setuid, setgid and sticky bits, but we normally
- * want to preserve them on directories.
+ * by the umask. Optimise by avoiding a chmod()
+ * if possible (which is usually the case if we
+ * made the directory). Note that mkdir() does not
+ * honour setuid, setgid and sticky bits, but we
+ * normally want to preserve them on directories.
*/
if (pflag)
rval = setfile(curr->fts_statp, 0);