mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-20 15:43:16 +00:00
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:
parent
6d823e816b
commit
16ef4ac3a3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=88755
16
bin/cp/cp.c
16
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);
|
||||
|
Loading…
Reference in New Issue
Block a user