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

View File

@@ -90,13 +90,18 @@ impl ActivityManager {
)),
host_params.password.as_deref(),
),
Remote::None => self.set_host_params(
HostParams::HostBridge(HostBridgeParams::Localhost(
env::current_dir()
.map_err(|e| format!("Could not get current directory: {e}"))?,
)),
None,
),
Remote::None => {
// local dir is remote_args.local_dir if set, otherwise current dir
let local_dir = remote_args
.local_dir
.unwrap_or_else(|| env::current_dir().unwrap());
debug!("host bridge is None, setting local dir to {:?}", local_dir,);
self.set_host_params(
HostParams::HostBridge(HostBridgeParams::Localhost(local_dir)),
None,
)
}
}?;
// set remote