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: --no-dereference option should copy dangling symbolic link but doesn't #3364

Closed
jfinkels opened this issue Apr 4, 2022 · 0 comments · Fixed by #3459
Closed

cp: --no-dereference option should copy dangling symbolic link but doesn't #3364

jfinkels opened this issue Apr 4, 2022 · 0 comments · Fixed by #3459
Labels

Comments

@jfinkels
Copy link
Collaborator

jfinkels commented Apr 4, 2022

The -P (--no-dereference) option in uutils cp does not match the behavior of GNU cp when attempting to copy a symbolic link that points to a file that does not exist.

GNU cp:

$ ln -s no-such-file dangle && cp -P dangle d2
# no output, d2 is created

uutils cp:

$ ln -s no-such-file dangle && ./target/release/cp -P dangle d2
./target/release/cp: not writing through dangling symlink 'd2'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant