Preserve credential provider logo transparency
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user