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)