mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
mismatch amount error
This commit is contained in:
parent
f46cd3f8ee
commit
6a70ea3c57
1 changed files with 8 additions and 6 deletions
|
|
@ -52,13 +52,15 @@ impl Mgr {
|
|||
}
|
||||
|
||||
async fn bulk_rename_do(root: PathBuf, old: Vec<PathBuf>, new: Vec<PathBuf>) -> Result<()> {
|
||||
terminal_clear(TTY.writer())?;
|
||||
if old.len() != new.len() {
|
||||
#[rustfmt::skip]
|
||||
let s = format!("Number of new and old file names mismatch (New: {}, Old: {}).\nPress <Enter> to exit...", new.len(), old.len());
|
||||
execute!(TTY.writer(), Print(s))?;
|
||||
|
||||
TTY.reader().read_exact(&mut [0])?;
|
||||
AppProxy::notify_error(
|
||||
"Bulk rename",
|
||||
format!(
|
||||
"Number of new and old file names mismatch (New: {}, Old: {})",
|
||||
new.len(),
|
||||
old.len()
|
||||
),
|
||||
);
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue