cp -r <directory> -T <target> throws a StripPrefixError
Nobody has claimed this yet.
- #7465 by @Carreau — closed without merging
- Dominant language
- Rust
- Stars
- 24.1k
- Forks
- 2k
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 365
Description
Description:
Recursively copying a directory with the --no-target-directory (-T) option to another location with a different name throws a StripPrefixError
Steps to Reproduce:
-
Create a directory (i.e named
temp) -
Copy the created directory and give it a new name with the following command
cp -r temp -T new_temp
Expected Behavior:
A new directory should be created at the target location containing the same files as the original one
Actual Behavior:
The command throws the following error:
cp: StripPrefixError(StripPrefixError(()))
Environment:
OS: Void Linux
cp version: cp 0.0.30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing cp -r temp -T new_temp in the Rust coreutils project and trace the recursive-copy path used with --no-target-directory. Done means the command completes without StripPrefixError and creates new_temp with the same files as temp; verify the behavior with a focused test if the relevant test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100