HomeFreeBSD

ln(1): fix -F behavior

Description

ln(1): fix -F behavior

When '-F' option is used, the target directory needs to be unlinked.
Currently, the modified target ("target/source") is being unlinked, and
since it doesn't yet exist, the original target isn't removed.
This is fixed by skipping the block where target is modified to
"target/source" when '-F' option is set.
Hence, a symbolic link (with the same name as of the original target) to
the source_file is produced.

Update the test for ln(1) to reflect fix for option '-F'

MFC after: 1 month
PR: 219943
Differential Revision: D11167
Submitted by: shivansh
Sponsored by: Google (GSoC 2017)

Details

Provenance
ngieAuthored on
Differential Revision
D11167: Fix behavior for '-F' option of ln(1)
Parents
rS320171: LIBADD: Try to support partial tree checkouts in some limited cases.
Branches
Unknown
Tags
Unknown