mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Fix panic in worktree scanning (#13057)
Release Notes: - Fixed a panic when worktree paths are incorrectly relative.
This commit is contained in:
parent
4cb45e63f4
commit
993109aee1
@ -2487,8 +2487,9 @@ impl Project {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let abs_path = file.abs_path(cx);
|
let abs_path = file.abs_path(cx);
|
||||||
let uri = lsp::Uri::from_file_path(&abs_path)
|
let Some(uri) = lsp::Uri::from_file_path(&abs_path).log_err() else {
|
||||||
.unwrap_or_else(|_| panic!("Failed to register file {abs_path:?}"));
|
return;
|
||||||
|
};
|
||||||
let initial_snapshot = buffer.text_snapshot();
|
let initial_snapshot = buffer.text_snapshot();
|
||||||
let language = buffer.language().cloned();
|
let language = buffer.language().cloned();
|
||||||
let worktree_id = file.worktree_id(cx);
|
let worktree_id = file.worktree_id(cx);
|
||||||
|
Loading…
Reference in New Issue
Block a user