Skip to content

Commit

Permalink
fix cache writing
Browse files Browse the repository at this point in the history
  • Loading branch information
TheAlan404 authored Jul 17, 2024
1 parent ee59dbe commit c22e507
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/app/caching.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ impl Cache {
}

pub fn write_json<T: serde::Serialize>(&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}"))?,
);
Expand Down

0 comments on commit c22e507

Please sign in to comment.