From 0c2126e818abe7a27e97c6974d50066e7b9820a6 Mon Sep 17 00:00:00 2001 From: mxve <68632137+mxve@users.noreply.github.com> Date: Sat, 29 Jun 2024 09:51:38 +0200 Subject: [PATCH] store local hash instead of remote --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 63e5e96..d4d92fe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -289,7 +289,8 @@ async fn update_dir( ) .await .unwrap(); - hashes.insert(file_name.to_owned(), file.hash.to_lowercase()); + let hash = misc::get_file_sha1(&file_path); + hashes.insert(file_name.to_owned(), hash.to_lowercase()); #[cfg(unix)] if file_name.ends_with(".exe") { let perms = std::os::unix::fs::PermissionsExt::from_mode(0o755);