mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
fix(bookmarks): Local directory path is not switching to what's specified in the bookmark
closes #316
This commit is contained in:
@@ -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))
|
||||
|
||||
@@ -36,6 +36,9 @@ impl AuthActivity {
|
||||
return None;
|
||||
};
|
||||
|
||||
debug!("Remote params: {:?}", remote_params);
|
||||
debug!("Host bridge params: {:?}", host_bridge_params);
|
||||
|
||||
self.save_recent();
|
||||
// Set file transfer params to context
|
||||
self.context_mut().set_remote_params(remote_params);
|
||||
|
||||
Reference in New Issue
Block a user