From 67d4ad1376aa7277dd48895425e1612f508adbb0 Mon Sep 17 00:00:00 2001 From: Gary Ewan Park Date: Fri, 23 Feb 2018 11:49:40 +0000 Subject: [PATCH] (GH-1415) Added additional check for zip content file - Check for the existence of the Install.txt file - If that doesn't exist, fall back to the old filename - Delete all files in content file as before --- .../helpers/functions/UnInstall-ChocolateyZipPackage.ps1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 index 15eeb7ab2c..33c7bb3812 100644 --- a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 @@ -64,7 +64,14 @@ param( Write-FunctionCallLogMessage -Invocation $MyInvocation -Parameters $PSBoundParameters $packagelibPath=$env:chocolateyPackageFolder - $zipContentFile=(join-path $packagelibPath $zipFileName) + ".txt" + $zipContentFile=(join-path $packagelibPath $zipFileName) + "Install.txt" + + # The Zip Content File may have previously existed under a different + # name. If *Install.txt doesn't exist, check for the old name + if(-Not (Test-Path -Path $zipFileContentPath)) { + $zipContentFile=(Join-Path $packagelibPath -ChildPath $zipFileName) + ".txt" + } + if ((Test-Path -path $zipContentFile)) { $zipContentFile $zipContents=get-content $zipContentFile