Skip to content

Commit

Permalink
refactor: rename to verify_file_hash
Browse files Browse the repository at this point in the history
  • Loading branch information
amr-crabnebula authored Dec 20, 2023
1 parent 9bbb8d1 commit 7fbe861
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions crates/packager/src/package/nsis/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use handlebars::{to_json, Handlebars};
use super::Context;
use crate::{
codesign::windows::{self as codesign, ConfigSignExt},
util::verify_path_hash,
util::verify_file_hash,
};
use crate::{
config::{Config, LogLevel, NSISInstallerMode, NsisCompression},
Expand Down Expand Up @@ -586,7 +586,7 @@ pub(crate) fn package(ctx: &Context) -> crate::Result<Vec<PathBuf>> {
let mismatched = NSIS_REQUIRED_FILES_HASH
.iter()
.filter(|(p, _, hash, hash_algorithm)| {
verify_path_hash(nsis_toolset_path.join(p), hash, *hash_algorithm).is_err()
verify_file_hash(nsis_toolset_path.join(p), hash, *hash_algorithm).is_err()
})
.collect::<Vec<_>>();

Expand Down
2 changes: 1 addition & 1 deletion crates/packager/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ fn verify_data_with_hasher(data: &[u8], hash: &str, mut hasher: impl Digest) ->
}
}

pub(crate) fn verify_path_hash<P: AsRef<Path>>(
pub(crate) fn verify_file_hash<P: AsRef<Path>>(
path: P,
hash: &str,
hash_algorithm: HashAlgorithm,
Expand Down

0 comments on commit 7fbe861

Please sign in to comment.