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: improve symlink handling #2426

Merged
merged 4 commits into from
Jun 18, 2021
Merged

cp: improve symlink handling #2426

merged 4 commits into from
Jun 18, 2021

Conversation

miDeb
Copy link
Contributor

@miDeb miDeb commented Jun 17, 2021

Closes #2423.

When we try to copy a symlink, don't dereference it (unless dereference is enabled). When recursively copying, dereference is disabled by default.

Copy link
Member

@tertsdiepraam tertsdiepraam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! There's a clippy lint on the complex if expression, but I guess you already noticed

@tertsdiepraam tertsdiepraam linked an issue Jun 18, 2021 that may be closed by this pull request
src/uu/cp/src/cp.rs Outdated Show resolved Hide resolved
@tertsdiepraam tertsdiepraam merged commit e273cb8 into uutils:master Jun 18, 2021
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.

cp: permission denied cp: copying dangling or nested symlink results in error
3 participants