ssh remoting: Fix wrong working directory for SSH terminals (#19672)
Before this change, we would save the working directory *on the client* of each shell that was running in a terminal. While it's technically right, it's wrong in all of these cases where `working_directory` was used: - in inline assistant - when resolving file paths in the terminal output - when serializing the current working dir and deserializing it on restart Release Notes: - Fixed terminals opened on remote hosts failing to deserialize with an error message after restarting Zed.
This commit is contained in:
@@ -1192,7 +1192,7 @@ impl SerializableItem for TerminalView {
|
||||
return None;
|
||||
}
|
||||
|
||||
if let Some((cwd, workspace_id)) = terminal.get_cwd().zip(self.workspace_id) {
|
||||
if let Some((cwd, workspace_id)) = terminal.working_directory().zip(self.workspace_id) {
|
||||
Some(cx.background_executor().spawn(async move {
|
||||
TERMINAL_DB
|
||||
.save_working_directory(item_id, workspace_id, cwd)
|
||||
|
||||
Reference in New Issue
Block a user