(path: &str)
| 1763 | } |
| 1764 | |
| 1765 | fn normalize_path(path: &str) -> String { |
| 1766 | let normalized = path.replace('\\', "/"); |
| 1767 | if let Some(rest) = normalized.strip_prefix("//?/UNC/") { |
| 1768 | return format!("//{rest}"); |
| 1769 | } |
| 1770 | if let Some(rest) = normalized.strip_prefix("//?/") { |
| 1771 | return rest.to_string(); |
| 1772 | } |
| 1773 | normalized |
| 1774 | } |
| 1775 | |
| 1776 | fn path_to_string(path: &Path) -> String { |
| 1777 | path.to_string_lossy().to_string() |