From 910ab614cdac5c0eb617057f063a91f80cd04b56 Mon Sep 17 00:00:00 2001 From: modeco80 Date: Mon, 30 Sep 2024 07:13:08 -0400 Subject: [PATCH] ok my bad --- src/shotter.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/shotter.rs b/src/shotter.rs index 0b9c1d4..99b3033 100644 --- a/src/shotter.rs +++ b/src/shotter.rs @@ -116,13 +116,13 @@ pub async fn take_one_screenshot( let zone = tzfile::Tz::named("GMT")?; let now = { chrono::Utc::now().with_timezone(&&zone) }; - let file_path = - root_path.join(&node_name_clone).join(format!( - "{:02}-{:02}-{:02}.webp", - now.hour(), - now.minute(), - now.second() - )); + let id_path = root_path.join(&node_name_clone); + let file_path = id_path.join(format!( + "{:02}-{:02}-{:02}.webp", + now.hour(), + now.minute(), + now.second() + )); let file_path_clone = file_path.clone(); @@ -151,8 +151,8 @@ pub async fn take_one_screenshot( let encoder = webp::Encoder::from_image(&image) .expect("fuck you"); - if !root_path.exists() { - std::fs::create_dir_all(&root_path)?; + if !id_path.exists() { + std::fs::create_dir_all(&id_path)?; } let mut file =