Repository navigation
Document behavior of fs::copy when source is a symlink - #165995
MarioIlRosso wants to merge 1 commit into
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @Mark-Simulacrum (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
|
Should this be platform dependent behavior? Or do we gurarantee that any platform that has anything that behaves like a symlink will act this way? |
I mostly read #141034 (comment) and just assumed it was the same for all platforms |
|
Re-tagging to libs to see if we know this is broadly true or how we want to document the behavior. |
|
Yeah, I would at least expect tests to verify this holds. |
Addresses #141034.
Added a paragraph to
std::fs::copy, explaining that iffromis a symlink, it will copy the referent of the link, and also suggest an alternative in case the user of the function wants to copy the symlink.@rustbot label T-libs A-filesystem