mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2024-11-14 14:45:52 -06:00
Add -Force
flag for proper Hidden File detection in Invoke-Preprocessing.ps1
(#2700)
* Update Invoke-Preprocessing.ps1 - Added `-Force` argument to Get-ChildItem functions at lines 80 and 90. * Update Invoke-Preprocessing.ps1 - Make changes to new Compile.ps1 file.
This commit is contained in:
parent
00668755c9
commit
314588283a
@ -92,7 +92,7 @@
|
|||||||
$matches = ($filePath) -match '^.*?\*'
|
$matches = ($filePath) -match '^.*?\*'
|
||||||
|
|
||||||
if ($matches) {
|
if ($matches) {
|
||||||
if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File)) {
|
if (-NOT (Get-ChildItem -Recurse -Path "$filePath" -File -Force)) {
|
||||||
$failedFilesList += "'$filePath', "
|
$failedFilesList += "'$filePath', "
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -108,7 +108,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Get Files List
|
# Get Files List
|
||||||
[System.Collections.ArrayList]$files = Get-ChildItem $WorkingDir -Recurse -Exclude $ExcludedFiles -File
|
[System.Collections.ArrayList]$files = Get-ChildItem $WorkingDir -Recurse -Exclude $ExcludedFiles -File -Force
|
||||||
$numOfFiles = $files.Count
|
$numOfFiles = $files.Count
|
||||||
|
|
||||||
# Only keep the 'FullName' Property for every entry in the list
|
# Only keep the 'FullName' Property for every entry in the list
|
||||||
@ -130,7 +130,7 @@
|
|||||||
$matches = ($pathToFind) -match '^.*?\*'
|
$matches = ($pathToFind) -match '^.*?\*'
|
||||||
|
|
||||||
if ($matches) {
|
if ($matches) {
|
||||||
$filesToCheck = Get-ChildItem -Recurse -Path "$pathToFind" -File
|
$filesToCheck = Get-ChildItem -Recurse -Path "$pathToFind" -File -Force
|
||||||
if ($filesToCheck) {
|
if ($filesToCheck) {
|
||||||
for ($k = 0; $k -lt $filesToCheck.Count; $k++) {
|
for ($k = 0; $k -lt $filesToCheck.Count; $k++) {
|
||||||
$fileToCheck = $filesToCheck[$k]
|
$fileToCheck = $filesToCheck[$k]
|
||||||
|
Loading…
Reference in New Issue
Block a user