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)
Fri, Sep 4, 12:26 AM
Unknown Object (File)
Wed, Sep 2, 12:29 AM
Unknown Object (File)
Mon, Aug 31, 12:43 AM
Unknown Object (File)
Sat, Aug 29, 12:52 AM
Unknown Object (File)
Wed, Aug 26, 12:27 PM
Unknown Object (File)
Mon, Aug 24, 12:43 PM
Unknown Object (File)
Sat, Aug 22, 10:44 AM
Unknown Object (File)
Sun, Aug 16, 7:05 PM
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