fix(bookmarks): Local directory path is not switching to what's specified in the bookmark

closes #316
This commit is contained in:
veeso
2025-03-22 13:25:29 +01:00
parent 1f377b242d
commit 806793421e
4 changed files with 27 additions and 7 deletions
+8
View File
@@ -83,8 +83,16 @@ impl AuthActivity {
}
fn collect_localhost_host_params(&self) -> Result<HostBridgeParams, &'static str> {
// get remote local path
let remote_local_path = self.get_input_local_directory(FormTab::Remote);
// Local path is:
// - the input local path if set
// - the remote local path if set
// - the current directory if neither is set
let path = self
.get_input_local_directory(FormTab::HostBridge)
.or(remote_local_path)
.unwrap_or_else(|| env::current_dir().unwrap_or_default());
Ok(HostBridgeParams::Localhost(path))