oops
This commit is contained in:
parent
eb36172d6a
commit
068ef70e7e
1 changed files with 5 additions and 0 deletions
|
@ -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)?;
|
||||
|
||||
|
|
Loading…
Reference in a new issue