From 2c765b1f5fcc938e322632f362f1b7da95c543e0 Mon Sep 17 00:00:00 2001 From: Rux Date: Sun, 8 Sep 2024 17:18:57 -0700 Subject: [PATCH] Update Invoke-Preprocessing.ps1 - Added `-Force` argument to Get-ChildItem functions at lines 80 and 90. --- tools/Invoke-Preprocessing.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/Invoke-Preprocessing.ps1 b/tools/Invoke-Preprocessing.ps1 index c9692fc68..adfd738b5 100644 --- a/tools/Invoke-Preprocessing.ps1 +++ b/tools/Invoke-Preprocessing.ps1 @@ -77,7 +77,7 @@ for ($i = 0; $i -lt $count; $i++) { $excludedFile = $ExcludedFiles[$i] $filePath = "$(($WorkingDir -replace ('\\$', '')) + '\' + ($excludedFile -replace ('\.\\', '')))" - if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File)) { + if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File -Force)) { $failedFilesList += "'$filePath', " } } @@ -87,7 +87,8 @@ } } - $files = Get-ChildItem $WorkingDir -Recurse -Exclude $ExcludedFiles -File + $files = Get-ChildItem $WorkingDir -Recurse -Exclude $ExcludedFiles -File -Force + $numOfFiles = $files.Count if ($numOfFiles -eq 0) {