(&self)
| 1648 | } |
| 1649 | |
| 1650 | fn get_cache_path(&self) -> Result<Option<PathBuf>, Error> { |
| 1651 | let path = Path::new(&self.get_config().cache_path); |
| 1652 | match create_path_if_not_exists(path) { |
| 1653 | Ok(_) => { |
| 1654 | let canon_path = self.canonicalize_path(path.to_path_buf()); |
| 1655 | Ok(Some(Path::new(&canon_path).to_path_buf())) |
| 1656 | } |
| 1657 | Err(err) => { |
| 1658 | self.get_logger().warn(format!( |
| 1659 | "Cache folder ({}) cannot be created: {}", |
| 1660 | path.display(), |
| 1661 | err |
| 1662 | )); |
| 1663 | Ok(None) |
| 1664 | } |
| 1665 | } |
| 1666 | } |
| 1667 | |
| 1668 | fn set_cache_path(&mut self, cache_path: String) { |
| 1669 | if !cache_path.is_empty() { |
no test coverage detected