This commit is contained in:
Lily Tsuru 2024-09-30 07:04:34 -04:00
parent eb36172d6a
commit 068ef70e7e

View file

@ -121,6 +121,7 @@ pub async fn take_one_screenshot(
now.second()
));
let file_path_clone = file_path.clone();
let _: anyhow::Result<()> =
@ -148,6 +149,10 @@ pub async fn take_one_screenshot(
let encoder = webp::Encoder::from_image(&image)
.expect("fuck you");
if !file_path_clone.exists() {
std::fs::create_dir_all(&file_path_clone)?;
}
let mut file =
std::fs::File::create(file_path_clone)?;