Preserve credential provider logo transparency

This commit is contained in:
2026-09-02 13:21:08 -06:00
parent fe77229b48
commit 74d746527c
3 changed files with 18 additions and 2 deletions
+12 -1
View File
@@ -123,7 +123,18 @@ finally {
$versionId = $packageHash.Substring(0, 16)
$installPath = Join-Path $installRoot "versions\$versionId"
$completeMarker = Join-Path $installPath '.complete'
if ((Test-Path -LiteralPath $installPath) -and -not (Test-Path -LiteralPath $completeMarker)) {
$completeMarkerValid = $false
if (Test-Path -LiteralPath $completeMarker -PathType Leaf) {
try {
$completeMarkerValid = [IO.File]::ReadAllText($completeMarker).Trim() -eq $packageHash
}
catch {
# Treat an unreadable marker as an incomplete installation. Never reuse
# a version directory unless its marker proves that every package byte
# represented by packageHash finished installing.
}
}
if ((Test-Path -LiteralPath $installPath) -and -not $completeMarkerValid) {
$installPath = '{0}-{1}' -f $installPath, ([Guid]::NewGuid().ToString('N').Substring(0, 8))
$completeMarker = Join-Path $installPath '.complete'
}