Skip to content

cp: copying dangling or nested symlink results in error #2422

@SuperSandro2000

Description

@SuperSandro2000

I have the following directory structure where the file two points to a none existing file.

 tree -h a/
 a
└──  c
   └──  d
      └──  2 ⇒ ../../d/c/1

When copying with uutils-cp I get

$ result/bin/cp -r -- a 2
cp: No such file or directory (os error 2)

Using gnu-cp works just fine and recreates the dangling symlink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions