From 44eb8e36364f038a98b0fee91a38bcc840c1d5aa Mon Sep 17 00:00:00 2001 From: Brandon H Date: Fri, 27 Mar 2015 22:50:02 -0500 Subject: [PATCH] (GH-121) Making Uninstall-ChocolateyZipPackage more robust when deleting files that were copied during installation of the Zip package --- .../helpers/functions/UnInstall-ChocolateyZipPackage.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 index 7dc5f61f78..ac38766127 100644 --- a/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 +++ b/src/chocolatey.resources/helpers/functions/UnInstall-ChocolateyZipPackage.ps1 @@ -10,8 +10,8 @@ # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and -# limitations under the License. - +# limitations under the License. + function UnInstall-ChocolateyZipPackage { <# .SYNOPSIS @@ -50,7 +50,7 @@ param( $zipContentFile $zipContents=get-content $zipContentFile foreach ($fileInZip in $zipContents) { - remove-item "$fileInZip" -ErrorAction SilentlyContinue + remove-item -Path "$fileInZip" -ErrorAction SilentlyContinue -Recurse -Force } } -} \ No newline at end of file +}