(input: &str)
| 893 | } |
| 894 | |
| 895 | fn normalize_virtual_path(input: &str) -> Result<WorkspacePath> { |
| 896 | let input = default_path_input(input); |
| 897 | if has_windows_path_prefix(input) { |
| 898 | bail!("Absolute paths are not supported by this workspace backend"); |
| 899 | } |
| 900 | |
| 901 | let normalized_input = input.replace('\\', "/"); |
| 902 | let path = Path::new(&normalized_input); |
| 903 | if path.is_absolute() { |
| 904 | bail!("Absolute paths are not supported by this workspace backend"); |
| 905 | } |
| 906 | |
| 907 | let relative = normalize_relative_path(path)?; |
| 908 | Ok(pathbuf_to_workspace_path(&relative)) |
| 909 | } |
| 910 | |
| 911 | fn default_path_input(input: &str) -> &str { |
| 912 | let trimmed = input.trim(); |
no test coverage detected