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
fc19a28cda
commit
19bf82d02a
1 file changed
+5
-1
@@ -25,7 +25,11 @@ function Get-FileHashSHA256 {
|
||||
$fullDirectoryPath = (Get-Item -Path $Directory).FullName
|
||||
|
||||
# Determine recursion based on $NoRecurse
|
||||
$searchOption = $NoRecurse ? [System.IO.SearchOption]::TopDirectoryOnly : [System.IO.SearchOption]::AllDirectories
|
||||
if ($NoRecurse) {
|
||||
$searchOption = [System.IO.SearchOption]::TopDirectoryOnly
|
||||
} else {
|
||||
$searchOption = [System.IO.SearchOption]::AllDirectories
|
||||
}
|
||||
|
||||
# Iterate over each file in the directory matching the pattern
|
||||
Get-ChildItem -Path $Directory -Filter $FilePattern -File -Recurse:$searchOption | ForEach-Object {
|
||||
|
||||
Reference in new issue
Block a user