mirror of
https://github.com/indetectables-net/toolkit.git
synced 2026-10-28 19:40:47 +00:00
Fix generate-checksums.ps1 bug
This commit is contained in:
1 parent
4f47da9871
commit
fc19a28cda
1 file changed
+1
-1
@@ -28,7 +28,7 @@ $fullDirectoryPath = (Get-Item -Path $Directory).FullName
|
||||
$searchOption = $NoRecurse ? [System.IO.SearchOption]::TopDirectoryOnly : [System.IO.SearchOption]::AllDirectories
|
||||
|
||||
# Iterate over each file in the directory matching the pattern
|
||||
Get-ChildItem -Path $Directory -Filter $FilePattern -File -Recurse: -not $NoRecurse | ForEach-Object {
|
||||
Get-ChildItem -Path $Directory -Filter $FilePattern -File -Recurse:$searchOption | ForEach-Object {
|
||||
$fileHash = Get-FileHashSHA256 -filePath $_.FullName
|
||||
$relativePath = $_.FullName.Substring($fullDirectoryPath.Length + 1).TrimStart('\')
|
||||
$hashResults.Add("$fileHash .\$relativePath")
|
||||
|
||||
Reference in new issue
Block a user