From 85747519113c2447e75668ab2d89c3b498961ea5 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 64021902cbf1a..ed257efc135ee 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)