freebsd-nq/bin
Kyle Evans f00f8b4fbd cp: fix -R recursion detection
The correct logic is a lot simpler than the previous iteration.  We
record the base fts_name to avoid having to worry about whether we
needed the root symlink name or not (as applicable), then we can simply
shift all of that logic to after path translation to make it less
fragile.

If we're copying to DNE, then we'll have swapped out the NULL root_stat
pointer and then attempted to recurse on it.  The previously nonexistent
directory shouldn't exist at all in the new structure, so just back out
from that tree entirely and move on.

The tests have been amended to indicate our expectations better with
subdirectory recursion.  If we copy A to A/B, then we expect to copy
everything from A/B/* into A/B/A/B, with exception to the A that we
create in A/B.

Reviewed by:	bapt
Sponsored by:	Klara, Inc.
Differential Revision:	https://reviews.freebsd.org/D34655
2022-04-05 20:41:00 -05:00
..
cat
chflags
chio
chmod
cp cp: fix -R recursion detection 2022-04-05 20:41:00 -05:00
csh pkgbase: Create a FreeBSD-csh package 2021-12-21 10:17:50 +01:00
date Correct source markup. No change to output. 2022-03-30 14:55:28 +11:00
dd
df df: do not report a 100% full inode usage on fs without inodes 2022-03-11 08:49:44 +01:00
domainname pkgbase: Put yellow pages programs to its own package 2021-12-21 10:17:22 +01:00
echo echo(1): Replace errexit() with err(3) 2021-11-09 22:12:19 +01:00
ed
expr
freebsd-version freebsd-version(1): Add -j flag to support jails 2021-10-01 13:50:56 -05:00
getfacl Fix build of bin/getfacl after libc changes. 2021-08-27 11:52:18 +03:00
hostname hostname: avoid strcpy() overlap in -d flag handling 2021-09-25 00:03:50 -05:00
kenv
kill
ln
ls ls(1): Allow LSCOLORS to specify an underline 2021-09-19 13:52:12 +02:00
mkdir src/bin/mkdir: Spell occur correctly. 2021-10-02 10:39:31 -06:00
mv
pax src/bin/pax: Fix spelling error 2021-10-02 10:39:34 -06:00
pkill
ps ps(1): Use calloc instead of malloc and memset. 2022-03-11 10:36:00 +01:00
pwait
pwd
realpath
rm
rmail
rmdir
setfacl
sh sh: fix autocompletion for commands that share name with a directory 2022-03-28 08:45:03 +02:00
sleep
stty
sync
test
tests
uuidgen
Makefile
Makefile.inc