cp: cp -rs symlink-to-dir dir should delete dir/symlink-to-dir

Open
#9,721 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
55/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
rust
Domain
cli

Research direction

Start with the cp command entry point and reproduce the exact mkdir, symlink, and uu-cp -rs b a sequence from the issue. Compare the resulting error and a directory contents with GNU cp; done means the destination symlink is handled as described by the issue rather than left behind with an error.

Written by the indexing model from the issue text.

Description

U - cp
$ mkdir a
$ ln -s a b
$ touch a/b
$ uu-cp -rs b a
uu-cp: cannot create symlink 'b' to 'b': File exists (os error 17)
$ ls a
b
$ gnu-cp -rs b a
cp: a/b: can make relative symbolic links only in current directory
$ ls a # nothing
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from uutils/coreutils

All issues in uutils/coreutils

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.