diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-03-01 12:25:13 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-01 12:25:13 +0100 |
commit | d670c29649307ba575c71e267104f033f8600906 (patch) | |
tree | 666eab8f3c0463d04d0d3c77c44c894b34d7d531 | |
parent | 3057ec434b657c3961048bbd42391649689e246c (diff) |
fix(pty): report no-cwd for empty path returned from sysinfo (#2213)
-rw-r--r-- | zellij-server/src/os_input_output.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/zellij-server/src/os_input_output.rs b/zellij-server/src/os_input_output.rs index a3e1fa10e..e9caec061 100644 --- a/zellij-server/src/os_input_output.rs +++ b/zellij-server/src/os_input_output.rs @@ -722,7 +722,11 @@ impl ServerOsApi for ServerOsInputOutput { system_info.refresh_processes_specifics(ProcessRefreshKind::default()); if let Some(process) = system_info.process(pid.into()) { - return Some(process.cwd().to_path_buf()); + 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 } |