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