freebsd-src/bin/cp
Dag-Erling Smørgrav fe836c5012 cp: Fix copying the root directory
When the source of the copy operation is the root directory, we should
neither append it to the destination path on FTS_D nor trim it back off
on FTS_DP.

PR:		291132
MFC after:	3 days
Fixes:          82fc0d09e8 ("cp: Partly restore symlink folllowing.")
Reviewed by:	markj
Differential Revision:	https://reviews.freebsd.org/D53863
2025-11-22 13:11:59 +01:00
..
tests cp: Fix copying the root directory 2025-11-22 13:11:59 +01:00
cp.1 cp: Add an option to visit sources in order. 2025-07-09 19:07:13 +02:00
cp.c cp: Fix copying the root directory 2025-11-22 13:11:59 +01:00
extern.h cp: Add GNU-compatible long options. 2025-07-09 19:07:13 +02:00
Makefile Remove residual blank line at start of Makefile 2024-07-15 16:43:39 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
utils.c cp: Add GNU-compatible long options. 2025-07-09 19:07:13 +02:00