(&self, path_buf: PathBuf)
| 1527 | } |
| 1528 | |
| 1529 | fn canonicalize_path(&self, path_buf: PathBuf) -> String { |
| 1530 | let mut canon_path = path_to_string(&path_buf); |
| 1531 | if WINDOWS.is(self.get_os()) || canon_path.starts_with(UNC_PREFIX) { |
| 1532 | canon_path = path_to_string( |
| 1533 | &path_buf |
| 1534 | .as_path() |
| 1535 | .canonicalize() |
| 1536 | .unwrap_or(path_buf.clone()), |
| 1537 | ) |
| 1538 | .replace(UNC_PREFIX, "") |
| 1539 | } |
| 1540 | if !path_to_string(&path_buf).eq(&canon_path) { |
| 1541 | self.get_logger().trace(format!( |
| 1542 | "Path {} has been canonicalized to {}", |
| 1543 | path_buf.display(), |
| 1544 | canon_path |
| 1545 | )); |
| 1546 | } |
| 1547 | canon_path |
| 1548 | } |
| 1549 | |
| 1550 | fn get_escaped_path(&self, string_path: String) -> String { |
| 1551 | let mut escaped_path = string_path.clone(); |
no test coverage detected