From 2295e25ae955551f33db35d662ecd838140ec712 Mon Sep 17 00:00:00 2001 From: Aleksei Gusev Date: Fri, 17 Apr 2026 15:31:02 +0300 Subject: [PATCH] Fix filtering recent projects --- src/lib.rs | 2 +- tests/matching_test.rs | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 54b8c7b..9b9ed97 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -146,7 +146,7 @@ pub fn query_projects(instance: &ZedInstance) -> Vec<(String, String)> { return None; } let first_path = Path::new(&first); - if first_path.exists() && !first_path.is_dir() { + if !first_path.is_dir() { return None; } let name = Path::new(&first) diff --git a/tests/matching_test.rs b/tests/matching_test.rs index 60b8d25..ffa7296 100644 --- a/tests/matching_test.rs +++ b/tests/matching_test.rs @@ -108,9 +108,11 @@ fn setup_fake_fs(base: &TempDir, project_paths: &[&str]) -> PathBuf { .unwrap(); for (i, path) in project_paths.iter().enumerate() { + let true_path = format!("{}{}", base.path().to_str().unwrap(), path); + std::fs::create_dir_all(&true_path).unwrap(); conn.execute( "INSERT INTO workspaces (paths, timestamp) VALUES (?1, ?2)", - rusqlite::params![path, i as i64], + rusqlite::params![&true_path, i as i64], ) .unwrap(); }