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:
parent
4214ed927f
commit
efc4d3efdf
3 changed files with 24 additions and 7 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue