From 2c2db807c5bc763e750b3f7bcd7c9ffa8f4beb01 Mon Sep 17 00:00:00 2001 From: Miles Johnson Date: Mon, 20 Nov 2023 11:20:22 -0800 Subject: [PATCH] Fix. --- crates/core/src/tool.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/crates/core/src/tool.rs b/crates/core/src/tool.rs index fce22c331..9edd328f3 100644 --- a/crates/core/src/tool.rs +++ b/crates/core/src/tool.rs @@ -681,16 +681,19 @@ impl Tool { } _ => { let checksum_hash = hash_file_contents(download_file)?; - let checksum_matching_line = - format!("{} {}", checksum_hash, fs::file_name(download_file)); + let download_file_name = fs::file_name(download_file); for line in BufReader::new(fs::open_file(checksum_file)?) .lines() .flatten() { // + // * // - if line == checksum_matching_line || line == checksum_hash { + if line == checksum_hash + || (line.starts_with(&checksum_hash) + && line.ends_with(&download_file_name)) + { verified = true; break; }