mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-21 23:01:05 +00:00
fix: task name when process arguments are empty
This commit is contained in:
parent
0da93562c9
commit
acb2eee65f
1 changed files with 6 additions and 5 deletions
|
|
@ -280,12 +280,13 @@ impl Scheduler {
|
|||
}
|
||||
|
||||
pub(super) fn process_open(&self, opener: &Opener, args: &[impl AsRef<OsStr>]) {
|
||||
let name = {
|
||||
let s = format!("Execute `{}`", opener.exec);
|
||||
let args = args.iter().map(|a| a.as_ref().to_string_lossy()).collect::<Vec<_>>().join(" ");
|
||||
if args.is_empty() { s } else { format!("{} with `{}`", s, args) }
|
||||
};
|
||||
|
||||
let mut running = self.running.write();
|
||||
let name = format!(
|
||||
"Exec `{}` with `{}`",
|
||||
opener.exec,
|
||||
args.iter().map(|a| a.as_ref()).collect::<Vec<_>>().join(" ".as_ref()).to_string_lossy()
|
||||
);
|
||||
let id = running.add(name);
|
||||
|
||||
let (cancel_tx, mut cancel_rx) = oneshot::channel();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue