HomeFreeBSD

cp: Further simplify the core logic.

Description

cp: Further simplify the core logic.

If the destination file exists but we decide unlink it, set the dne
flag. This means we don't need to re-check the conditions that would
have caused us to delete the file when we later need to decide whether
to create or replace it.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: kevans
Differential Revision: https://reviews.freebsd.org/D43064

Details

Provenance
desAuthored on Dec 14 2023, 4:07 PM
Reviewer
kevans
Differential Revision
D43064: cp: Further simplify the core logic.
Parents
rG0f4467ce444b: cp: Move the flags around a bit.
Branches
Unknown
Tags
Unknown