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. :-)
This commit is contained in:
Stephen McKay 2002-01-01 06:14:26 +00:00
parent 6d823e816b
commit 16ef4ac3a3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88755

View File

@ -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);