Clean up after install on quit updates

This commit is contained in:
Matt Stevens committed 2012-02-12 20:02:46 -07:00
1 parent 449b00ed3e
commit 6be55685c8
1 file changed
+13 -12
+13 -12
View File
@@ -117,19 +117,20 @@
else
appPath = [host installationPath];
[[NSWorkspace sharedWorkspace] openFile: appPath];
if( folderpath )
{
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
[[NSFileManager defaultManager] removeItemAtPath: selfPath error: NULL];
#endif
}
if (folderpath)
{
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
[[NSFileManager defaultManager] removeItemAtPath: selfPath error: NULL];
#endif
exit(EXIT_SUCCESS);
}