From c084b6aade00430df0dbe831c4916148e22c3ead Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Wed, 22 May 2024 12:49:42 -0600 Subject: [PATCH] remoting fixes (#12137) Release Notes: - N/A --- crates/recent_projects/src/dev_servers.rs | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/crates/recent_projects/src/dev_servers.rs b/crates/recent_projects/src/dev_servers.rs index e6eb0891fd573..212020253b706 100644 --- a/crates/recent_projects/src/dev_servers.rs +++ b/crates/recent_projects/src/dev_servers.rs @@ -132,12 +132,7 @@ impl DevServerProjects { let markdown = cx.new_view(|cx| Markdown::new("".to_string(), markdown_style, None, cx)); Self { - mode: Mode::CreateDevServer(CreateDevServer { - creating: false, - dev_server_id: None, - access_token: None, - manual_setup: false, - }), + mode: Mode::Default(None), focus_handle, scroll_handle: ScrollHandle::new(), dev_server_store, @@ -154,12 +149,16 @@ impl DevServerProjects { dev_server_id: DevServerId, cx: &mut ViewContext, ) { - let path = self.project_path_input.read(cx).text(cx).trim().to_string(); + let mut path = self.project_path_input.read(cx).text(cx).trim().to_string(); if path == "" { return; } + if !path.starts_with('/') && !path.starts_with('~') { + path = format!("~/{}", path); + } + if self .dev_server_store .read(cx) @@ -381,7 +380,7 @@ impl DevServerProjects { creating: false, dev_server_id: Some(DevServerId(dev_server.dev_server_id)), access_token: Some(dev_server.access_token), - manual_setup: false, + manual_setup, }); cx.notify(); })?;