Skip to content
This repository has been archived by the owner on Jun 21, 2019. It is now read-only.

Copying of symlinks fails #143

Closed
joelgallant opened this issue Nov 6, 2018 · 3 comments
Closed

Copying of symlinks fails #143

joelgallant opened this issue Nov 6, 2018 · 3 comments

Comments

@joelgallant
Copy link

Fails here when a dependency contains a soft symlink that needs to be copied (failed to copy /home/joel/.cargo/git/checkouts/foo/sha1/foo/bar to /home/joel/dev/baz/vendor/foo/bar).

Where foo/bar is a symlink to another directory in the crate. I can replicate the same kinda thing with cp foo/bar dest, needs to be cp --no-dereference foo/bar dest. I don't know how to do the same thing with fs::copy, I haven't run in to that with std before. Would it need to check is_symlink and std::os::unix::fs::symlink manually?

@alexcrichton
Copy link
Owner

Ah yeah this is a case where is_symlink and such will need to be manually used, but seems reasonable to me!

joelgallant added a commit to joelgallant/cargo-vendor that referenced this issue Nov 6, 2018
@joelgallant
Copy link
Author

Seems similar if not the same kind of error as rust-lang/cargo#3896 - since fs::copy tries to follow the symlink

@alexcrichton
Copy link
Owner

This crate is now included natively in Cargo as of rust-lang/cargo#6869 and today's nightly Rust. I'm closing all issues in this repository before I archive the repository, but if you're still interested in seeing this issue fixed then please feel free to file an issue with Cargo itself!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants