From 05b75aa44c4d2c0d15530b806c3fb325b47dc1fe Mon Sep 17 00:00:00 2001 From: Andy Matuschak Date: Wed, 11 Feb 2009 14:54:55 -0800 Subject: [PATCH] Fixes Bug #321761: Update crashes below NSTask if /usr/bin/mdimport does not exist or is not executable --- SUInstaller.m | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SUInstaller.m b/SUInstaller.m index 6d968fea..37f246df 100644 --- a/SUInstaller.m +++ b/SUInstaller.m @@ -93,7 +93,15 @@ NSTask *mdimport = [[[NSTask alloc] init] autorelease]; [mdimport setLaunchPath:@"/usr/bin/mdimport"]; [mdimport setArguments:[NSArray arrayWithObject:[host bundlePath]]]; - [mdimport launch]; + @try + { + [mdimport launch]; + } + @catch (NSException * launchException) + { + // No big deal. + NSLog(@"Sparkle Error: %@", [launchException description]); + } } + (void)_finishInstallationWithResult:(BOOL)result host:(SUHost *)host error:(NSError *)error delegate:delegate