updated hashes file path to script path

This commit is contained in:
2021-11-25 11:08:19 -05:00
parent 1f97bbe182
commit 8481a48aa0

View File

@@ -19,7 +19,7 @@ $jsonStoredHashes = [System.Text.Encoding]::Unicode.GetString([System.Convert]::
# convert from json to object
$storedHashes = $($jsonStoredHashes | convertfrom-json)
# get current file hashes
$hashes = $(Get-ChildItem -Recurse C:\users\jgaunt\Git\bitwardenbackup\lib\ | Get-FileHash -Algorithm SHA256)
$hashes = $(Get-ChildItem -Recurse "$PSScriptRoot\lib\" | Get-FileHash -Algorithm SHA256)
# very simple compare object and if anything is different, the count will be greater than zero. Exit and inform user that files might have been tempered with.
$compareObjects = $(Compare-Object -Ref $storedHashes -Dif $hashes -Property Hash, Path)