From 8481a48aa0da5b1486faec866d393d9942d5adc5 Mon Sep 17 00:00:00 2001 From: John Gaunt Date: Thu, 25 Nov 2021 11:08:19 -0500 Subject: [PATCH] updated hashes file path to script path --- bitwardenBackup.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bitwardenBackup.ps1 b/bitwardenBackup.ps1 index 5571cea..afa3070 100644 --- a/bitwardenBackup.ps1 +++ b/bitwardenBackup.ps1 @@ -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)