Fix git features not working when a Windows host collaborates with a unix guest (#43515)

We were using `std::path::Path::strip_prefix` to determine which
repository an absolute path belongs to, which doesn't work when the
paths are Windows-style but the code is running on unix. Replace it with
a platform-agnostic implementation of `strip_prefix`.

Release Notes:

- Fixed git features not working when a Windows host collaborates with a
unix guest
This commit is contained in:
Cole Miller
2025-11-26 16:56:34 +00:00
committed by GitHub
parent 57e1bb8106
commit 757c043171
15 changed files with 159 additions and 30 deletions
+1 -1
View File
@@ -4837,7 +4837,7 @@ impl ProjectPanel {
.collect::<Vec<_>>();
let active_index = folded_ancestors.active_index();
let components_len = components.len();
let delimiter = SharedString::new(path_style.separator());
let delimiter = SharedString::new(path_style.primary_separator());
for (index, component) in components.iter().enumerate() {
if index != 0 {
let delimiter_target_index = index - 1;