From a7ff41b3ceabead3697351840f1b4c2b21ae7fa3 Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 26 Sep 2015 21:10:09 -0400 Subject: [PATCH] If the developer disables automatic updating, don't check writability --- Sparkle/SUHost.m | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Sparkle/SUHost.m b/Sparkle/SUHost.m index 549a7bbe..6ce40fbb 100644 --- a/Sparkle/SUHost.m +++ b/Sparkle/SUHost.m @@ -64,13 +64,14 @@ - (BOOL)allowsAutomaticUpdates { - // Can we automatically update in the background without bugging the user (e.g, with a administrator password prompt)? - BOOL isWritableAtBundle = [[NSFileManager defaultManager] isWritableFileAtPath:self.bundlePath]; - // Does the developer want us to disable automatic updates? NSNumber *developerAllowsAutomaticUpdates = [self objectForInfoDictionaryKey:SUAllowsAutomaticUpdatesKey]; + if (developerAllowsAutomaticUpdates != nil && !developerAllowsAutomaticUpdates.boolValue) { + return NO; + } - return isWritableAtBundle && (developerAllowsAutomaticUpdates == nil || developerAllowsAutomaticUpdates.boolValue); + // Can we automatically update in the background without bugging the user (e.g, with a administrator password prompt)? + return [[NSFileManager defaultManager] isWritableFileAtPath:self.bundlePath]; } - (NSString *)appCachePath