mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
..
This commit is contained in:
parent
8931264e01
commit
d7832ca470
1 changed files with 2 additions and 2 deletions
|
|
@ -187,7 +187,7 @@ impl Manager {
|
|||
|
||||
let path = cwd.join(&name);
|
||||
if !force && fs::symlink_metadata(&path).await.is_ok() {
|
||||
match emit!(Input(InputOpt::top("Overwrite an existing file?"))).recv().await {
|
||||
match emit!(Input(InputOpt::top("Overwrite an existing file? (y/N)"))).recv().await {
|
||||
Some(Ok(c)) if c == "y" || c == "Y" => (),
|
||||
_ => return Ok(()),
|
||||
}
|
||||
|
|
@ -234,7 +234,7 @@ impl Manager {
|
|||
return;
|
||||
}
|
||||
|
||||
let mut result = emit!(Input(InputOpt::hovered("Overwrite an existing file?")));
|
||||
let mut result = emit!(Input(InputOpt::hovered("Overwrite an existing file? (y/N)")));
|
||||
if let Some(Ok(choice)) = result.recv().await {
|
||||
if choice == "y" || choice == "Y" {
|
||||
fs::rename(&hovered, new).await.ok();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue