From 16ef4ac3a39fa6862e1b22c9e081a8ec84e8a3f7 Mon Sep 17 00:00:00 2001 From: Stephen McKay Date: Tue, 1 Jan 2002 06:14:26 +0000 Subject: [PATCH] Bruce thought some of the comments I added were not clear enough. This is a combination of my words and his. We will stop fiddling now. :-) --- bin/cp/cp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 15b418931f6..19faa289961 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);