Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cp: normalize paths before checking for duplicate sources #6824

Closed
matrixhead opened this issue Oct 26, 2024 · 0 comments · Fixed by #6825
Closed

cp: normalize paths before checking for duplicate sources #6824

matrixhead opened this issue Oct 26, 2024 · 0 comments · Fixed by #6825
Labels

Comments

@matrixhead
Copy link
Contributor

The cp command generally does not allow duplicate source files.
for example

touch a; mkdir d;
cp a a d/ 

This produces:

cp: warning: source file 'a' specified more than once

Additionally, when providing paths like this:

cp ./a a d/ 

GNU cp correctly identifies these two paths as pointing to the same file, while our implementation currently attempts to copy both paths, resulting in:

cp: will not overwrite just-created 'd/a' with 'a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants