fix: replace panics reachable from user input with proper error handling

This commit is contained in:
Christian Visintin
2026-02-27 22:19:17 +01:00
parent a252caa66b
commit be237c39a6
7 changed files with 85 additions and 37 deletions

View File

@@ -478,9 +478,10 @@ impl Activity for FileTransferActivity {
&& !self.browser.local_pane().fs.is_localhost()
{
let host_bridge_params = self.context().host_bridge_params().unwrap();
let ft_params = host_bridge_params.unwrap_protocol_params();
// print params
let msg: String = Self::get_connection_msg(ft_params);
let msg: String = match host_bridge_params.protocol_params() {
Some(ft_params) => Self::get_connection_msg(ft_params),
None => String::from("Connecting..."),
};
// Set init state to connecting popup
self.mount_blocking_wait(msg.as_str());
// Connect to remote