Page MenuHomeFreeBSD

cp: Fix copying to root directory.
ClosedPublic

Authored by des on May 30 2025, 9:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 10, 8:43 AM
Unknown Object (File)
Mon, Dec 8, 8:54 PM
Unknown Object (File)
Sat, Dec 6, 2:22 AM
Unknown Object (File)
Tue, Dec 2, 8:11 PM
Unknown Object (File)
Tue, Nov 25, 8:55 PM
Unknown Object (File)
Oct 29 2025, 9:38 PM
Unknown Object (File)
Oct 29 2025, 3:52 AM
Unknown Object (File)
Oct 29 2025, 3:52 AM
Subscribers

Details

Summary

The trailing-slash logic would strip the target down to an empty
string, which we would then fail to stat, and subsequently attempt
(and fail) to create.

Fixes: 82fc0d09e862
Sponsored by: Klara, Inc.

Diff Detail

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