(&self, path_buf: PathBuf)
| 1498 | } |
| 1499 | |
| 1500 | fn canonicalize_path(&self, path_buf: PathBuf) -> String { |
| 1501 | let mut canon_path = path_to_string(&path_buf); |
| 1502 | if WINDOWS.is(self.get_os()) || canon_path.starts_with(UNC_PREFIX) { |
| 1503 | canon_path = path_to_string( |
| 1504 | &path_buf |
| 1505 | .as_path() |
| 1506 | .canonicalize() |
| 1507 | .unwrap_or(path_buf.clone()), |
| 1508 | ) |
| 1509 | .replace(UNC_PREFIX, "") |
| 1510 | } |
| 1511 | if !path_to_string(&path_buf).eq(&canon_path) { |
| 1512 | self.get_logger().trace(format!( |
| 1513 | "Path {} has been canonicalized to {}", |
| 1514 | path_buf.display(), |
| 1515 | canon_path |
| 1516 | )); |
| 1517 | } |
| 1518 | canon_path |
| 1519 | } |
| 1520 | |
| 1521 | fn get_escaped_path(&self, string_path: String) -> String { |
| 1522 | let mut escaped_path = string_path.clone(); |
no test coverage detected