From d1a688d7d7425119b88bd50ed5217671749121ba Mon Sep 17 00:00:00 2001 From: JMARyA Date: Sat, 13 Apr 2024 22:22:17 +0200 Subject: [PATCH] fix cache --- src/proxy.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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");