trim + fixes

This commit is contained in:
2025-09-18 12:21:01 +03:00
parent 35fafb1ca6
commit 28ba2135ec
10 changed files with 139 additions and 25 deletions

View File

@ -76,7 +76,7 @@ fn hardcopy(
})?;
} else if metadata.file_type().is_symlink() {
let symlink_value = fs::read_link(source)?;
fs::remove_file(destination)?;
if destination.exists() { fs::remove_file(destination)? }
unix::fs::symlink(symlink_value, destination)?;
}