Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Allow opening a single remote file (#11983)

Conrad Irwin483a735e03b9
diff --git a/crates/headless/src/headless.rs b/crates/headless/src/headless.rs
index 60c96191829..0258b1370cf 100644
--- a/crates/headless/src/headless.rs
+++ b/crates/headless/src/headless.rs
@@ -178,7 +178,7 @@ impl DevServer {
let path = std::path::Path::new(&expanded);
let fs = cx.read_model(&this, |this, _| this.app_state.fs.clone())?;
- let path_exists = fs.is_dir(path).await;
+ let path_exists = fs.metadata(path).await.is_ok_and(|result| result.is_some());
if !path_exists {
return Err(anyhow!(ErrorCode::DevServerProjectPathDoesNotExist))?;
}