(&self)
| 1682 | } |
| 1683 | |
| 1684 | fn get_cache_path(&self) -> Result<Option<PathBuf>, Error> { |
| 1685 | let path = Path::new(&self.get_config().cache_path); |
| 1686 | match create_path_if_not_exists(path) { |
| 1687 | Ok(_) => { |
| 1688 | let canon_path = self.canonicalize_path(path.to_path_buf()); |
| 1689 | Ok(Some(Path::new(&canon_path).to_path_buf())) |
| 1690 | } |
| 1691 | Err(err) => { |
| 1692 | self.get_logger().warn(format!( |
| 1693 | "Cache folder ({}) cannot be created: {}", |
| 1694 | path.display(), |
| 1695 | err |
| 1696 | )); |
| 1697 | Ok(None) |
| 1698 | } |
| 1699 | } |
| 1700 | } |
| 1701 | |
| 1702 | fn set_cache_path(&mut self, cache_path: String) { |
| 1703 | if !cache_path.is_empty() { |
no test coverage detected