fix(meta-remove): exclude Configuration.xml, ConfigDumpInfo.xml and Subsystems from both search loops

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Nick Shirokov
2026-02-16 17:04:55 +03:00
parent 27bb08d127
commit d7f012b307
@@ -219,11 +219,13 @@ foreach ($ext in $searchExtensions) {
}
if ($skip) { continue }
}
# Skip auto-cleaned files (Configuration.xml, ConfigDumpInfo.xml, Subsystems)
$relPath = $file.FullName.Substring($ConfigDir.Length + 1)
if ($relPath -eq "Configuration.xml" -or $relPath -eq "ConfigDumpInfo.xml" -or $relPath.StartsWith("Subsystems")) { continue }
$content = [System.IO.File]::ReadAllText($file.FullName, [System.Text.Encoding]::UTF8)
foreach ($pat in $searchPatterns) {
if ($content.Contains($pat)) {
$relPath = $file.FullName.Substring($ConfigDir.Length + 1)
$references += @{ File = $relPath; Pattern = $pat }
break # one match per file is enough
}