Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433
Use symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433Zoxc wants to merge 1 commit intorust-lang:mainfrom
symlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal#152433Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
|
Junction points only work on directories, not files. A hard link or a file copy would be necessary if symlinks aren't available. |
31820df to
6e0c9f5
Compare
|
Well this seems to only be called to create junctions to directories (on Windows), otherwise I'd be seeing more privilege errors. |
|
So it sounds like |
|
@rustbot author I don't have much context on the details here (especially Windows) but generally speaking it seems plausible that this is a bug in the callsite? |
|
Reminder, once the PR becomes ready for a review, use |
… use symbolic links in `copy_link_internal`
6e0c9f5 to
4ce1afa
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
symlink_file on Windowssymlink_dir to create junctions on Windows instead of trying to use symbolic links in copy_link_internal
Symbolic links require extra privileges on Windows, so this falls back to creating junctions in
symlink_filewhen operating on a directory.