mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
refactor: consolidate branches
This commit is contained in:
parent
29a610d389
commit
b0bb9f19d8
1 changed files with 12 additions and 12 deletions
|
|
@ -67,18 +67,18 @@ impl Actor for Rename {
|
||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
if opt.force || !maybe_exists(&new).await || provider::must_identical(&old, &new).await {
|
if !opt.force
|
||||||
if conversion_to_dir_requested && target_is_empty {
|
&& maybe_exists(&new).await
|
||||||
Self::replace_file_with_dir(old, new).await.ok();
|
&& !provider::must_identical(&old, &new).await
|
||||||
} else {
|
&& !ConfirmProxy::show(ConfirmCfg::overwrite(&new)).await
|
||||||
Self::r#do(tab, old, new).await.ok();
|
{
|
||||||
}
|
return;
|
||||||
} else if ConfirmProxy::show(ConfirmCfg::overwrite(&new)).await {
|
}
|
||||||
if conversion_to_dir_requested && target_is_empty {
|
|
||||||
Self::replace_file_with_dir(old, new).await.ok();
|
if conversion_to_dir_requested && target_is_empty {
|
||||||
} else {
|
Self::replace_file_with_dir(old, new).await.ok();
|
||||||
Self::r#do(tab, old, new).await.ok();
|
} else {
|
||||||
}
|
Self::r#do(tab, old, new).await.ok();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
succ!();
|
succ!();
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue