fix(pty): report no-cwd for empty path returned from sysinfo (#2213)
This commit is contained in:
parent
3057ec434b
commit
d670c29649
1 changed files with 5 additions and 1 deletions
|
|
@ -722,8 +722,12 @@ impl ServerOsApi for ServerOsInputOutput {
|
|||
system_info.refresh_processes_specifics(ProcessRefreshKind::default());
|
||||
|
||||
if let Some(process) = system_info.process(pid.into()) {
|
||||
let cwd = process.cwd();
|
||||
let cwd_is_empty = cwd.iter().next().is_none();
|
||||
if !cwd_is_empty {
|
||||
return Some(process.cwd().to_path_buf());
|
||||
}
|
||||
}
|
||||
None
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue