diff --git a/src/app/caching.rs b/src/app/caching.rs index 887a09d..ef68644 100644 --- a/src/app/caching.rs +++ b/src/app/caching.rs @@ -43,6 +43,7 @@ impl Cache { } pub fn write_json(&self, path: &str, data: &T) -> Result<()> { + std::fs::create_dir_all(self.path(path).parent().unwrap())?; let writer = BufWriter::new( File::create(self.path(path)).context(format!("Creating cache file at: {path}"))?, );