mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-26 06:31:23 -07:00
Get-FileChecksum allways returns a string now,
and the test_win_copy integration tests that depend on the checksum have been updated in this change too.
This commit is contained in:
parent
e36b7130ff
commit
30b92a6f4c
2 changed files with 3 additions and 3 deletions
|
@ -151,7 +151,7 @@ Function Get-FileChecksum($path)
|
|||
{
|
||||
$sp = new-object -TypeName System.Security.Cryptography.SHA1CryptoServiceProvider;
|
||||
$fp = [System.IO.File]::Open($path, [System.IO.Filemode]::Open, [System.IO.FileAccess]::Read);
|
||||
[System.BitConverter]::ToString($sp.ComputeHash($fp)).Replace("-", "").ToLower();
|
||||
$hash = [System.BitConverter]::ToString($sp.ComputeHash($fp)).Replace("-", "").ToLower();
|
||||
$fp.Dispose();
|
||||
}
|
||||
ElseIf (Test-Path -PathType Container $path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue