From 84d154e203f0d230db505aa21ad879424b180b36 Mon Sep 17 00:00:00 2001 From: Aleksei Gusev Date: Fri, 17 Apr 2026 15:14:39 +0300 Subject: [PATCH] Filter out files and dirs that don't exist --- src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lib.rs b/src/lib.rs index 4220144..54b8c7b 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -145,6 +145,10 @@ pub fn query_projects(instance: &ZedInstance) -> Vec<(String, String)> { if !seen.insert(first.clone()) { return None; } + let first_path = Path::new(&first); + if first_path.exists() && !first_path.is_dir() { + return None; + } let name = Path::new(&first) .file_name() .map(|n| n.to_string_lossy().into_owned())