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: fix backup of destination symlink #5731

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

cakebaker
Copy link
Contributor

@cakebaker cakebaker commented Dec 27, 2023

When using cp -b a symlink, GNU cp backups symlink as symlink~ and then overwrites symlink with a (and thus symlink is no longer a symlink). uutils cp, on the other hand, backups the target of the symlink as symlink~ and then overwrites the target of the symlink with a (and thus symlink remains a symlink). This PR fixes this behavior.

@sylvestre sylvestre merged commit 04a7f9c into uutils:main Dec 27, 2023
56 checks passed
@cakebaker cakebaker deleted the cp_backup_with_dest_a_symlink branch December 28, 2023 06:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants