From c22e50714254d02670a3678e3965ff70a4b86c5c Mon Sep 17 00:00:00 2001 From: dennis <43997085+TheAlan404@users.noreply.github.com> Date: Wed, 17 Jul 2024 10:49:36 +0300 Subject: [PATCH] fix cache writing --- src/app/caching.rs | 1 + 1 file changed, 1 insertion(+) 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}"))?, );