diff --git a/src/proxy.rs b/src/proxy.rs index 2346f8c..82ae2ea 100644 --- a/src/proxy.rs +++ b/src/proxy.rs @@ -68,9 +68,8 @@ impl Mirror { let p = std::path::Path::new(&path[1..]); let p = std::path::Path::new(&self.data_dir).join(p); + Self::create_cache_dir(p.parent().unwrap()); if !self.no_cache.is_match(path) { - Self::create_cache_dir(p.parent().unwrap()); - if p.exists() { // todo : refresh caches log::info!("Returning {path} from cache");