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)
Mon, May 11, 5:06 PM
Unknown Object (File)
Mon, May 11, 4:22 PM
Unknown Object (File)
Mon, May 11, 4:21 PM
Unknown Object (File)
Mon, May 11, 4:20 PM
Unknown Object (File)
Mon, May 11, 11:26 AM
Unknown Object (File)
Mon, May 11, 4:19 AM
Unknown Object (File)
Tue, May 5, 12:02 AM
Unknown Object (File)
Sun, May 3, 7:31 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