fix cache

This commit is contained in:
JMARyA 2024-04-13 22:22:17 +02:00
parent 569665a5a2
commit d1a688d7d7
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263

View file

@ -68,9 +68,8 @@ impl Mirror {
let p = std::path::Path::new(&path[1..]); let p = std::path::Path::new(&path[1..]);
let p = std::path::Path::new(&self.data_dir).join(p); 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) { if !self.no_cache.is_match(path) {
Self::create_cache_dir(p.parent().unwrap());
if p.exists() { if p.exists() {
// todo : refresh caches // todo : refresh caches
log::info!("Returning {path} from cache"); log::info!("Returning {path} from cache");