Adding first pass at win_copy, win_file and win_template modules.
This commit is contained in:
parent
e396611206
commit
2e60425b71
1 changed files with 1 additions and 4 deletions
|
@ -53,10 +53,7 @@ Else
|
|||
|
||||
If ($get_md5 -and $result.stat.exists -and -not $result.stat.isdir)
|
||||
{
|
||||
$sp = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider;
|
||||
$fp = [System.IO.File]::Open($path, [System.IO.Filemode]::Open, [System.IO.FileAccess]::Read);
|
||||
$hash = [System.BitConverter]::ToString($sp.ComputeHash($fp)).Replace("-", "").ToLower();
|
||||
$fp.Dispose();
|
||||
$hash = Get-FileMd5($path);
|
||||
Set-Attr $result.stat "md5" $hash;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue