mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
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.
This commit is contained in:
1 parent
9b116929ad
commit
575bdda768
1 file changed
+7
-4
@@ -4,6 +4,7 @@
|
||||
#import "SUHost.h"
|
||||
#import "SUStandardVersionComparator.h"
|
||||
#import "SUStatusController.h"
|
||||
#import "SUPlainInstallerInternals.h"
|
||||
|
||||
#include <unistd.h>
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user