From f785853239ab2344cf1677b89cdf039ec3b6877c Mon Sep 17 00:00:00 2001 From: Peter Tripp Date: Mon, 7 Jul 2025 10:55:37 -0400 Subject: [PATCH] ssh: Fix incorrect handling of ssh paths that exist locally (#33743) - Closes: https://github.com/zed-industries/zed/issues/33733 I also tested that remote canonicalization of symlink directories still works. (e.g. `zed ssh://hostname/~/foo` where `foo -> foobar` will open `~/foobar` on the remote). I believe this has been broken since 2024-10-11 from https://github.com/zed-industries/zed/pull/19057. CC: @SomeoneToIgnore. I guess I'm the only person silly enough to run `zed ssh://hostname/tmp`. Release Notes: - ssh: Fixed an issue where Zed incorrectly canonicalized paths locally prior to connecting to the ssh remote. --- crates/zed/src/main.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 89d9c2edf127ff4b75f3100be3b8600dbaa89c06..e04e9c38c15b7ed1bc95bffc0d702b013150b3a5 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -727,11 +727,10 @@ fn handle_open_request(request: OpenRequest, app_state: Arc, cx: &mut if let Some(connection_options) = request.ssh_connection { cx.spawn(async move |mut cx| { - let paths_with_position = - derive_paths_with_position(app_state.fs.as_ref(), request.open_paths).await; + let paths: Vec = request.open_paths.into_iter().map(PathBuf::from).collect(); open_ssh_project( connection_options, - paths_with_position.into_iter().map(|p| p.path).collect(), + paths, app_state, workspace::OpenOptions::default(), &mut cx,