Updated to reflect the logic in https://github.com/zed-industries/zed/blob/main/crates/paths/src/paths.rs. Release Notes: - N/A