Small fixes
This commit is contained in:
@@ -73,8 +73,7 @@ sub get_hash {
|
||||
# --- Compute SHA-256 hash of the file ---
|
||||
return undef unless -f $file_path && -r $file_path;
|
||||
open(my $fh, '<:raw', $file_path) or do { warn "Cannot open $file_path: $!"; return undef; };
|
||||
my $hash = sha256_hex($fh);
|
||||
close($fh);
|
||||
my $hash = Digest::SHA->new(256)->addfile($fh)->hexdigest; close($fh);
|
||||
return $hash;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user