mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
Fix folder name copying
This commit is contained in:
parent
f9abe886cc
commit
8641729478
1 changed files with 2 additions and 1 deletions
|
|
@ -39,7 +39,8 @@ impl Actor for Copy {
|
|||
s.extend_from_slice(&opt.separator.transform(&u.name().unwrap_or_default()));
|
||||
}
|
||||
"name_without_ext" => {
|
||||
s.extend_from_slice(&opt.separator.transform(&u.stem().unwrap_or_default()));
|
||||
let name = if u.as_local().is_some_and(|p| p.is_dir()) { u.name() } else { u.stem() };
|
||||
s.extend_from_slice(&opt.separator.transform(&name.unwrap_or_default()));
|
||||
}
|
||||
_ => bail!("Unknown copy type: {}", opt.r#type),
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue