This commit is contained in:
+4
-1
@@ -104,7 +104,10 @@ fn copy_dir_all(src: &Path, dst: &Path) -> Result<(), Box<dyn Error>> {
|
||||
|
||||
// Reproduce symlinks as symlinks rather than following them, so that
|
||||
// dangling/absolute symlinks do not abort the copy.
|
||||
if std::fs::symlink_metadata(&src_path)?.file_type().is_symlink() {
|
||||
if std::fs::symlink_metadata(&src_path)?
|
||||
.file_type()
|
||||
.is_symlink()
|
||||
{
|
||||
let target = std::fs::read_link(&src_path)?;
|
||||
let _ = std::fs::remove_file(&dst_path);
|
||||
symlink(&target, &dst_path)?;
|
||||
|
||||
Reference in New Issue
Block a user