Skip to content

Commit

Permalink
Clean up after install on quit updates
Browse files Browse the repository at this point in the history
  • Loading branch information
mattstevens committed Feb 13, 2012
1 parent 449b00e commit 6be5568
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions finish_installation.m
Expand Up @@ -117,19 +117,20 @@ - (void) relaunch
else else
appPath = [host installationPath]; appPath = [host installationPath];
[[NSWorkspace sharedWorkspace] openFile: appPath]; [[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); exit(EXIT_SUCCESS);
} }


Expand Down

0 comments on commit 6be5568

Please sign in to comment.