From fcbce978d4a69ae77d367cf7c527af786f41f5a9 Mon Sep 17 00:00:00 2001 From: Rhino <1+rhino@noreply.gitea.rhino.nrw> Date: Sat, 20 Jun 2026 22:09:12 +0200 Subject: [PATCH] fix(KRITISCH): Exclude strikt als Array (verifiziert mit echtem PowerShell) --- scripts/rollback.ps1 | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/scripts/rollback.ps1 b/scripts/rollback.ps1 index 75e6350..095db04 100644 --- a/scripts/rollback.ps1 +++ b/scripts/rollback.ps1 @@ -1,8 +1,7 @@ # StatusQuo_Updates/scripts/rollback.ps1 -# Kanonisches Rollback-Skript (Referenz). Die ausgelieferte rollback.bat enthaelt -# diese Logik EINGEBETTET und laeuft damit vollstaendig OFFLINE (kein Netz noetig). -# Erwartet im aufrufenden Scope: $root, $stopBat, $startBat -# Beachtet .backupignore (grosse Content-Ordner, die nie veraendert werden). +# Kanonisches Rollback-Skript (Referenz). rollback.bat enthaelt diese Logik +# EINGEBETTET und laeuft vollstaendig OFFLINE. Beachtet .backupignore. +# Erwartet im Scope: $root, $stopBat, $startBat $ErrorActionPreference = 'Stop' # Erwartet im Scope: $root, $stopBat, $startBat @@ -14,9 +13,11 @@ $_startName = if ($null -ne $startBat) { $startBat } else { 'dgl.bat' } $_excl = @('.backup') $_ignoreFile = Join-Path $root '.backupignore' if (Test-Path -LiteralPath $_ignoreFile) { - $_excl += (Get-Content -LiteralPath $_ignoreFile | ForEach-Object { $_.Trim() } | - Where-Object { $_ -ne '' -and -not $_.StartsWith('#') }) + $_extra = @(Get-Content -LiteralPath $_ignoreFile | ForEach-Object { $_.Trim() } | + Where-Object { $_ -ne '' -and -not $_.StartsWith('#') }) + $_excl = $_excl + $_extra } +$_excl = @($_excl) # strikt als Array (verhindert Skalar-Entpackung) $bk = Join-Path $root '.backup' if (-not (Test-Path -LiteralPath $bk)) {