diff options
Diffstat (limited to 'src/components/mail/view/html.rs')
-rw-r--r-- | src/components/mail/view/html.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/components/mail/view/html.rs b/src/components/mail/view/html.rs index 34f28fcf..d5334561 100644 --- a/src/components/mail/view/html.rs +++ b/src/components/mail/view/html.rs @@ -151,10 +151,10 @@ impl Component for HtmlView { }; if let Some(command) = command { let p = create_temp_file(&self.bytes, None, None, true); - let (exec_cmd, argument) = + let exec_cmd = super::desktop_exec_to_command(&command, p.path.display().to_string(), false); - match Command::new(&exec_cmd) - .arg(&argument) + match Command::new("sh") + .args(&["-c", &exec_cmd]) .stdin(Stdio::piped()) .stdout(Stdio::piped()) .spawn() @@ -166,8 +166,8 @@ impl Component for HtmlView { Err(err) => { context.replies.push_back(UIEvent::StatusEvent( StatusEvent::DisplayMessage(format!( - "Failed to start `{} {}`: {}", - &exec_cmd, &argument, err + "Failed to start `{}`: {}", + &exec_cmd, err )), )); } |