Fixes 242566

Sparkle now cleans up all the stuff it makes in /tmp
This commit is contained in:
Andy Matuschak committed 2008-06-25 22:39:17 -07:00
1 parent 959ef54b7e
commit 46f9b4a049
2 files changed
+9

No files matched your search

+2
View File
@@ -47,7 +47,9 @@
- (void)installUpdate;
- (void)installerFinishedForHostBundle:(NSBundle *)hb;
- (void)installerForHostBundle:(NSBundle *)hb failedWithError:(NSError *)error;
- (void)relaunchHostApp;
- (void)cleanUp;
- (void)abortUpdate;
- (void)abortUpdateWithError:(NSError *)error;
+7
View File
@@ -222,6 +222,8 @@
if ([delegate shouldPostponeRelaunchForUpdate:updateItem untilInvoking:invocation])
return;
}
[self cleanUp]; // Clean up the download and extracted files.
[[NSNotificationCenter defaultCenter] postNotificationName:SUUpdaterWillRestartNotification object:self];
if ([delegate respondsToSelector:@selector(updaterWillRelaunchApplication)])
@@ -243,6 +245,11 @@
[NSApp terminate:self];
}
- (void)cleanUp
{
[[NSFileManager defaultManager] removeFileAtPath:[downloadPath stringByDeletingLastPathComponent] handler:nil];
}
- (void)installerForHostBundle:(NSBundle *)hb failedWithError:(NSError *)error
{
if (hb != hostBundle) { return; }