Skip to content

cp: --no-dereference option should copy dangling symbolic link but doesn't #3364

Description

@jfinkels

The -P (--no-dereference) option in uutils cp does not match the behavior of GNU cp when attempting to copy a symbolic link that points to a file that does not exist.

GNU cp:

$ ln -s no-such-file dangle && cp -P dangle d2
# no output, d2 is created

uutils cp:

$ ln -s no-such-file dangle && ./target/release/cp -P dangle d2
./target/release/cp: not writing through dangling symlink 'd2'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    Status
    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions