mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ln: remove redundant check
if `dst.exists()` and `settings.overwrite` is `OverwriteMode::Force`, we already delete the file in the match above.
This commit is contained in:
parent
ed69d797b5
commit
af8f47ea6a
1 changed files with 0 additions and 5 deletions
|
@ -422,11 +422,6 @@ fn link(src: &Path, dst: &Path, settings: &Settings) -> Result<()> {
|
|||
}
|
||||
}
|
||||
|
||||
if settings.no_dereference && matches!(settings.overwrite, OverwriteMode::Force) && dst.exists()
|
||||
{
|
||||
fs::remove_file(dst)?;
|
||||
}
|
||||
|
||||
if settings.symbolic {
|
||||
symlink(&source, dst)?;
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue