(&self, path_buf: PathBuf)
| 1516 | } |
| 1517 | |
| 1518 | fn canonicalize_path(&self, path_buf: PathBuf) -> String { |
| 1519 | let mut canon_path = path_to_string(&path_buf); |
| 1520 | if WINDOWS.is(self.get_os()) || canon_path.starts_with(UNC_PREFIX) { |
| 1521 | canon_path = path_to_string( |
| 1522 | &path_buf |
| 1523 | .as_path() |
| 1524 | .canonicalize() |
| 1525 | .unwrap_or(path_buf.clone()), |
| 1526 | ) |
| 1527 | .replace(UNC_PREFIX, "") |
| 1528 | } |
| 1529 | if !path_to_string(&path_buf).eq(&canon_path) { |
| 1530 | self.get_logger().trace(format!( |
| 1531 | "Path {} has been canonicalized to {}", |
| 1532 | path_buf.display(), |
| 1533 | canon_path |
| 1534 | )); |
| 1535 | } |
| 1536 | canon_path |
| 1537 | } |
| 1538 | |
| 1539 | fn get_escaped_path(&self, string_path: String) -> String { |
| 1540 | let mut escaped_path = string_path.clone(); |
no test coverage detected