From e1002f066249db59fef3b6ec532086351b389a26 Mon Sep 17 00:00:00 2001 From: Zorg Date: Fri, 25 Sep 2015 18:51:55 -0400 Subject: [PATCH] Revert using -[NSWorkspace openFile:] --- Sparkle/Autoupdate/Autoupdate.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sparkle/Autoupdate/Autoupdate.m b/Sparkle/Autoupdate/Autoupdate.m index d06a8653..3fa016d3 100644 --- a/Sparkle/Autoupdate/Autoupdate.m +++ b/Sparkle/Autoupdate/Autoupdate.m @@ -214,7 +214,8 @@ static const NSTimeInterval SUTerminationTimeDelay = 0.5; // (Or it does become frontmost, but the OS backgrounds it afterwards.. It's some kind of timing/activation issue that doesn't occur all the time) // The only remedy I've been able to find is waiting an arbitrary delay before exiting our application - if (![[NSWorkspace sharedWorkspace] launchApplication:relaunchPath]) { + // Don't use -launchApplication: because we may not be launching an application. Eg: it could be a system prefpane + if (![[NSWorkspace sharedWorkspace] openFile:relaunchPath]) { SULog(@"Failed to launch %@", relaunchPath); }