Page MenuHomeFreeBSD

cp: Fix copying the root directory
ClosedPublic

Authored by des on Nov 21 2025, 6:03 PM.
Tags
None
Referenced Files
F151318922: D53863.id166921.diff
Tue, Apr 7, 1:55 PM
Unknown Object (File)
Sat, Apr 4, 11:46 PM
Unknown Object (File)
Sun, Mar 29, 12:42 PM
Unknown Object (File)
Fri, Mar 27, 3:14 AM
Unknown Object (File)
Thu, Mar 26, 10:15 PM
Unknown Object (File)
Wed, Mar 25, 11:12 AM
Unknown Object (File)
Tue, Mar 24, 10:10 PM
Unknown Object (File)
Thu, Mar 19, 11:21 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