If the developer disables automatic updating, don't check writability

This commit is contained in:
Zorg committed 2015-09-26 21:10:09 -04:00
1 parent 6079739534
commit a7ff41b3ce
1 file changed
+5 -4
+5 -4
View File
@@ -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