Update driver now correctly marks itself as "finished" before terminating.

This is important for apps which checked this value during an app delegate's applicationShouldTerminate:.

Thanks to Nick Zitzmann for the patch.
This commit is contained in:
Andy Matuschak committed 2009-12-27 22:49:04 -06:00
1 parent fd20e0725b
commit b96c95066c
1 file changed
+2 -1
+2 -1
View File
@@ -288,7 +288,8 @@
if ([[updater delegate] respondsToSelector:@selector(pathToRelaunchForUpdater:)])
pathToRelaunch = [[updater delegate] pathToRelaunchForUpdater:updater];
[NSTask launchedTaskWithLaunchPath:relaunchPath arguments:[NSArray arrayWithObjects:pathToRelaunch, [NSString stringWithFormat:@"%d", [[NSProcessInfo processInfo] processIdentifier]], nil]];
[self setValue:[NSNumber numberWithBool:YES] forKey:@"finished"];
[NSApp terminate:self];
}