mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-08-01 05:27:45 +00:00
mv: remove unnecessary OR in condition
This commit is contained in:
parent
0c6b1893a4
commit
09360e6796
1 changed files with 1 additions and 3 deletions
|
@ -433,9 +433,7 @@ fn rename(
|
|||
let mut backup_path = None;
|
||||
|
||||
if to.exists() {
|
||||
if (b.update == UpdateMode::ReplaceIfOlder || b.update == UpdateMode::ReplaceNone)
|
||||
&& b.overwrite == OverwriteMode::Interactive
|
||||
{
|
||||
if b.update == UpdateMode::ReplaceIfOlder && b.overwrite == OverwriteMode::Interactive {
|
||||
// `mv -i --update old new` when `new` exists doesn't move anything
|
||||
// and exit with 0
|
||||
return Ok(());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue