Page MenuHomeFreeBSD

cp: Fix copying the root directory
ClosedPublic

Authored by des on Nov 21 2025, 6:03 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Jan 29, 2:14 PM
Unknown Object (File)
Wed, Jan 28, 11:59 AM
Unknown Object (File)
Wed, Jan 28, 11:08 AM
Unknown Object (File)
Wed, Jan 21, 9:55 AM
Unknown Object (File)
Dec 25 2025, 4:54 AM
Unknown Object (File)
Dec 24 2025, 2:07 AM
Unknown Object (File)
Dec 16 2025, 7:11 AM
Unknown Object (File)
Dec 16 2025, 6:51 AM
Subscribers

Details

Summary

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: 82fc0d09e862 ("cp: Partly restore symlink folllowing.")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable