Ignore metadata file in RustLspAdapter::get_cached_server_binary (#35708)

Follows https://github.com/zed-industries/zed/pull/35642

Release Notes:

- Fixed accidentally picking a non executable as a rust-analyzer server
when downloading fails
This commit is contained in:
Lukas Wirth 2025-08-06 11:08:32 +02:00 committed by GitHub
parent eb4b73b88e
commit 0302f6356e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1039,7 +1039,11 @@ async fn get_cached_server_binary(container_dir: PathBuf) -> Option<LanguageServ
let mut last = None;
let mut entries = fs::read_dir(&container_dir).await?;
while let Some(entry) = entries.next().await {
last = Some(entry?.path());
let path = entry?.path();
if path.extension().is_some_and(|ext| ext == "metadata") {
continue;
}
last = Some(path);
}
anyhow::Ok(LanguageServerBinary {