mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-24 04:38:16 +00:00
Merge pull request #145 from mattstevens/install-on-quit-cleanup
Clean up after install on quit updates
This commit is contained in:
commit
44cf0d0e51
1 file changed
+13
-12
+13
-12
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user