debugger: Don't open non-absolute paths from stack frame list (#31534)
Follow-up to #31524 with a more general fix Release Notes: - N/A --------- Co-authored-by: Piotr <piotr@zed.dev>
This commit is contained in:
parent
eb863f8fd6
commit
f20596c33b
1 changed files with 1 additions and 3 deletions
|
@ -250,9 +250,6 @@ impl StackFrameList {
|
||||||
let Some(abs_path) = Self::abs_path_from_stack_frame(&stack_frame) else {
|
let Some(abs_path) = Self::abs_path_from_stack_frame(&stack_frame) else {
|
||||||
return Task::ready(Err(anyhow!("Project path not found")));
|
return Task::ready(Err(anyhow!("Project path not found")));
|
||||||
};
|
};
|
||||||
if abs_path.starts_with("<node_internals>") {
|
|
||||||
return Task::ready(Ok(()));
|
|
||||||
}
|
|
||||||
let row = stack_frame.line.saturating_sub(1) as u32;
|
let row = stack_frame.line.saturating_sub(1) as u32;
|
||||||
cx.emit(StackFrameListEvent::SelectedStackFrameChanged(
|
cx.emit(StackFrameListEvent::SelectedStackFrameChanged(
|
||||||
stack_frame_id,
|
stack_frame_id,
|
||||||
|
@ -345,6 +342,7 @@ impl StackFrameList {
|
||||||
s.path
|
s.path
|
||||||
.as_deref()
|
.as_deref()
|
||||||
.map(|path| Arc::<Path>::from(Path::new(path)))
|
.map(|path| Arc::<Path>::from(Path::new(path)))
|
||||||
|
.filter(|path| path.is_absolute())
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue