From 8e3a8d8d03f2243625b2bfdedd9d587cd484874b Mon Sep 17 00:00:00 2001 From: Micha Reiser Date: Fri, 1 Nov 2024 16:44:30 +0100 Subject: [PATCH] Give non-existent files a durability of at least Medium (#14034) --- crates/ruff_db/src/files.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/ruff_db/src/files.rs b/crates/ruff_db/src/files.rs index 64021902cbf1af..ed257efc135ee1 100644 --- a/crates/ruff_db/src/files.rs +++ b/crates/ruff_db/src/files.rs @@ -102,7 +102,9 @@ impl Files { Ok(metadata) if metadata.file_type().is_directory() => { builder.status(FileStatus::IsADirectory) } - _ => builder.status(FileStatus::NotFound), + _ => builder + .status(FileStatus::NotFound) + .status_durability(Durability::MEDIUM.max(durability)), }; builder.new(db)