ok my bad
This commit is contained in:
parent
994863aed8
commit
910ab614cd
1 changed files with 9 additions and 9 deletions
|
@ -116,8 +116,8 @@ pub async fn take_one_screenshot(
|
||||||
let zone = tzfile::Tz::named("GMT")?;
|
let zone = tzfile::Tz::named("GMT")?;
|
||||||
let now = { chrono::Utc::now().with_timezone(&&zone) };
|
let now = { chrono::Utc::now().with_timezone(&&zone) };
|
||||||
|
|
||||||
let file_path =
|
let id_path = root_path.join(&node_name_clone);
|
||||||
root_path.join(&node_name_clone).join(format!(
|
let file_path = id_path.join(format!(
|
||||||
"{:02}-{:02}-{:02}.webp",
|
"{:02}-{:02}-{:02}.webp",
|
||||||
now.hour(),
|
now.hour(),
|
||||||
now.minute(),
|
now.minute(),
|
||||||
|
@ -151,8 +151,8 @@ pub async fn take_one_screenshot(
|
||||||
let encoder = webp::Encoder::from_image(&image)
|
let encoder = webp::Encoder::from_image(&image)
|
||||||
.expect("fuck you");
|
.expect("fuck you");
|
||||||
|
|
||||||
if !root_path.exists() {
|
if !id_path.exists() {
|
||||||
std::fs::create_dir_all(&root_path)?;
|
std::fs::create_dir_all(&id_path)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
let mut file =
|
let mut file =
|
||||||
|
|
Loading…
Reference in a new issue