We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 306a7a0 commit 1987d87Copy full SHA for 1987d87
src/cmd/vendor.rs
@@ -757,14 +757,18 @@ pub fn copy_recursively(
757
}
758
759
let filetype = entry.file_type()?;
760
+ let canonical_path_filetype =
761
+ std::fs::metadata(std::fs::canonicalize(entry.path()).unwrap())
762
+ .unwrap()
763
+ .file_type();
764
if filetype.is_dir() {
765
copy_recursively(
766
entry.path(),
767
destination.as_ref().join(entry.file_name()),
768
includes,
769
ignore,
770
)?;
- } else if filetype.is_symlink() {
771
+ } else if filetype.is_symlink() && canonical_path_filetype.is_dir() {
772
let orig = std::fs::read_link(entry.path());
773
symlink_dir(orig.unwrap(), destination.as_ref().join(entry.file_name()))?;
774
} else {
0 commit comments