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:
parent
eb4b73b88e
commit
0302f6356e
1 changed files with 5 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue