From 575bdda7682ffe3fedac39828e50d05724f1075a Mon Sep 17 00:00:00 2001 From: Uli Kusterer Date: Mon, 14 Dec 2009 22:36:34 +0100 Subject: [PATCH] Make sure that, even on 10.4, we delete our temp folder. Also, we no longer use the stop-gap measure of trashing the temp folder, we really delete it after successful installation. --- finish_installation.m | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/finish_installation.m b/finish_installation.m index f52e5eee..08831e10 100644 --- a/finish_installation.m +++ b/finish_installation.m @@ -4,6 +4,7 @@ #import "SUHost.h" #import "SUStandardVersionComparator.h" #import "SUStatusController.h" +#import "SUPlainInstallerInternals.h" #include @@ -109,13 +110,15 @@ else appPath = [host installationPath]; [[NSWorkspace sharedWorkspace] openFile: appPath]; -#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 if( folderpath ) - [[NSFileManager defaultManager] removeFileAtPath: [SUInstaller updateFolder] handler: nil]; + { + NSError* theError = nil; + if( ![SUPlainInstaller _removeFileAtPath: [SUInstaller updateFolder] error: &theError] ) + SULog( @"Couldn't remove update folder: %@.", theError ); + } +#if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 [[NSFileManager defaultManager] removeFileAtPath: selfPath handler: nil]; #else - if( folderpath ) - [[NSFileManager defaultManager] removeItemAtPath: [SUInstaller updateFolder] error: NULL]; [[NSFileManager defaultManager] removeItemAtPath: selfPath error: NULL]; #endif exit(EXIT_SUCCESS);