(&self)
| 1630 | } |
| 1631 | |
| 1632 | fn get_cache_path(&self) -> Result<Option<PathBuf>, Error> { |
| 1633 | let path = Path::new(&self.get_config().cache_path); |
| 1634 | match create_path_if_not_exists(path) { |
| 1635 | Ok(_) => { |
| 1636 | let canon_path = self.canonicalize_path(path.to_path_buf()); |
| 1637 | Ok(Some(Path::new(&canon_path).to_path_buf())) |
| 1638 | } |
| 1639 | Err(err) => { |
| 1640 | self.get_logger().warn(format!( |
| 1641 | "Cache folder ({}) cannot be created: {}", |
| 1642 | path.display(), |
| 1643 | err |
| 1644 | )); |
| 1645 | Ok(None) |
| 1646 | } |
| 1647 | } |
| 1648 | } |
| 1649 | |
| 1650 | fn set_cache_path(&mut self, cache_path: String) { |
| 1651 | if !cache_path.is_empty() { |
no test coverage detected