use allow_core::normalize_path;
use std::path::Path;
pub fn source_tree_path_text(path: &Path) -> String {
let text = path.to_string_lossy().replace('\\', "/");
if let Some(stripped) = text.strip_prefix("//?/UNC/") {
return format!("//{stripped}");
}
if let Some(stripped) = text.strip_prefix("//?/") {
return stripped.to_string();
}
if let Some(stripped) = text.strip_prefix("/?/") {
return stripped.to_string();
}
normalize_path(path)
}