Change try again error to authorize later error

This commit is contained in:
Zorg committed 2016-07-23 14:49:19 -04:00
1 parent c2db46f656
commit 41ee168f2c
8 files changed
+9 -9

No files matched your search

+1 -1
View File
@@ -13,5 +13,5 @@ typedef NS_ENUM(NSUInteger, SUAuthorizationReply)
SUAuthorizationReplySuccess = 0,
SUAuthorizationReplyCancelled = 1,
SUAuthorizationReplyFailure = 2,
SUAuthorizationReplyTryAgainLater = 3
SUAuthorizationReplyAuthorizeLater = 3
};
+1 -1
View File
@@ -176,7 +176,7 @@
}
if (needsSystemAuthorization && !preflighted && !allowingInteraction) {
completionHandler(SUAuthorizationReplyTryAgainLater);
completionHandler(SUAuthorizationReplyAuthorizeLater);
} else {
BOOL submittedProgressTool = [self submitProgressToolAtPath:progressToolPath withHostBundle:hostBundle allowingInteraction:allowingInteraction installerPath:installerPath shouldSubmitInstaller:!shouldSubmitInstallerImmediately];
+1 -1
View File
@@ -124,7 +124,7 @@
- (void)abortUpdateWithError:(NSError *)error
{
BOOL showNextUpdateImmediately = (error == nil || error.code == SUInstallationTryAgainLaterError) && (!self.willInstallSilently || self.updateItem.isCriticalUpdate);
BOOL showNextUpdateImmediately = (error == nil || error.code == SUInstallationAuthorizeLaterError) && (!self.willInstallSilently || self.updateItem.isCriticalUpdate);
[self.coreDriver abortUpdateAndShowNextUpdateImmediately:showNextUpdateImmediately error:error];
}
+1 -1
View File
@@ -156,7 +156,7 @@
- (void)abortUpdateAndShowNextUpdateImmediately:(BOOL)shouldShowUpdateImmediately downloadedUpdate:(SUDownloadedUpdate * _Nullable)downloadedUpdate error:(nullable NSError *)error
{
if (error != nil) {
if (error.code != SUNoUpdateError && error.code != SUInstallationCancelledError && error.code != SUInstallationTryAgainLaterError) { // Let's not bother logging this.
if (error.code != SUNoUpdateError && error.code != SUInstallationCancelledError && error.code != SUInstallationAuthorizeLaterError) { // Let's not bother logging this.
NSError *errorToDisplay = error;
int finiteRecursion=5;
do {
+1 -1
View File
@@ -285,7 +285,7 @@
[self.installerDriver abortInstall];
[self.downloadDriver cleanup];
SUDownloadedUpdate *downloadedUpdate = (error == nil || error.code == SUInstallationTryAgainLaterError) ? self.downloadedUpdate : nil;
SUDownloadedUpdate *downloadedUpdate = (error == nil || error.code == SUInstallationAuthorizeLaterError) ? self.downloadedUpdate : nil;
[self.basicDriver abortUpdateAndShowNextUpdateImmediately:shouldShowUpdateImmediately downloadedUpdate:downloadedUpdate error:error];
}
+1 -1
View File
@@ -55,7 +55,7 @@ typedef NS_ENUM(OSStatus, SUError) {
SUInstallationError = 4005,
SUDowngradeError = 4006,
SUInstallationCancelledError = 4007,
SUInstallationTryAgainLaterError = 4008
SUInstallationAuthorizeLaterError = 4008
};
#endif
+2 -2
View File
@@ -448,8 +448,8 @@
case SUAuthorizationReplyCancelled:
completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationCancelledError userInfo:nil]);
break;
case SUAuthorizationReplyTryAgainLater:
completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationTryAgainLaterError userInfo:nil]);
case SUAuthorizationReplyAuthorizeLater:
completionHandler([NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationAuthorizeLaterError userInfo:nil]);
break;
case SUAuthorizationReplySuccess:
[self setUpConnection];
+1 -1
View File
@@ -223,7 +223,7 @@
abortUpdate();
});
}];
} else if (error.code == SUInstallationCancelledError || error.code == SUInstallationTryAgainLaterError) {
} else if (error.code == SUInstallationCancelledError || error.code == SUInstallationAuthorizeLaterError) {
abortUpdate();
} else {
[self.userDriver showUpdaterError:nonNullError acknowledgement:^{