Skip to content

Commit

Permalink
Give non-existent files a durability of at least Medium (astral-sh#14034
Browse files Browse the repository at this point in the history
)
  • Loading branch information
MichaReiser authored and TomerBin committed Nov 1, 2024
1 parent aaa8cab commit 8e3a8d8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion crates/ruff_db/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 8e3a8d8

Please sign in to comment.