From b96c95066c12c42d8a2c7d477ef0544c107b0487 Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Sun, 27 Dec 2009 22:49:04 -0600 Subject: [PATCH] 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. --- SUBasicUpdateDriver.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/SUBasicUpdateDriver.m b/SUBasicUpdateDriver.m index b22d9e4e..5801cc59 100644 --- a/SUBasicUpdateDriver.m +++ b/SUBasicUpdateDriver.m @@ -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]; }