mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-26 04:57:54 +00:00
Fixes 242566
Sparkle now cleans up all the stuff it makes in /tmp
This commit is contained in:
1 parent
959ef54b7e
commit
46f9b4a049
2 files changed
+9
No files matched your search
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in new issue
Block a user