HomeFreeBSD

cp: Fix copying to root directory.

Description

cp: Fix copying to root directory.

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.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D50604

Details

Provenance
desAuthored on May 30 2025, 3:44 PM
Reviewer
allanjude
Differential Revision
D50604: cp: Fix copying to root directory.
Parents
rG046800313ab6: bsdinstall: implement rootpass with bsddialog
Branches
Unknown
Tags
Unknown