geenforce: fix http-payload path doubling + kiosk startup cleanup

This commit is contained in:
2026-07-28 17:49:56 -04:00
parent 8f0c110dda
commit 2f6163e864
2 changed files with 32 additions and 6 deletions

View File

@@ -313,8 +313,13 @@ function Resolve-ShopdbPayloads {
$ref = Get-ShopdbProperty $entry 'PayloadRef'
$local = Get-ShopdbPayload -Sha256 $sha -Config $Config -Filename $ref -CacheDir $CacheDir
if (-not $local) { throw "payload $sha for '$($entry.Name)' could not be fetched/verified" }
if ($entry.PSObject.Properties.Name -contains $field) { $entry.$field = $local }
else { $entry | Add-Member -NotePropertyName $field -NotePropertyValue $local }
# Write the LEAF filename, not the absolute path: the engine resolves the
# entry field as Join-Path $InstallerRoot <field>, and the runner sets
# InstallerRoot to this same payloads dir. Passing an absolute path made
# the engine double it (InstallerRoot + C:\...\ -> C:\...\C:\...).
$leaf = Split-Path -Leaf $local
if ($entry.PSObject.Properties.Name -contains $field) { $entry.$field = $leaf }
else { $entry | Add-Member -NotePropertyName $field -NotePropertyValue $leaf }
$changed = $true
}
if (-not $changed) { return $ManifestPath }