From 41ee168f2cde64d1963257467467195cf17d952f Mon Sep 17 00:00:00 2001 From: Zorg Date: Sat, 23 Jul 2016 14:49:19 -0400 Subject: [PATCH] Change try again error to authorize later error --- InstallerLauncher/SUAuthorizationReply.h | 2 +- InstallerLauncher/SUInstallerLauncher.m | 2 +- Sparkle/SUAutomaticUpdateDriver.m | 2 +- Sparkle/SUBasicUpdateDriver.m | 2 +- Sparkle/SUCoreBasedUpdateDriver.m | 2 +- Sparkle/SUErrors.h | 2 +- Sparkle/SUInstallerDriver.m | 4 ++-- Sparkle/SUUIBasedUpdateDriver.m | 2 +- 8 files changed, 9 insertions(+), 9 deletions(-) diff --git a/InstallerLauncher/SUAuthorizationReply.h b/InstallerLauncher/SUAuthorizationReply.h index 3b5ef276..941bd17a 100644 --- a/InstallerLauncher/SUAuthorizationReply.h +++ b/InstallerLauncher/SUAuthorizationReply.h @@ -13,5 +13,5 @@ typedef NS_ENUM(NSUInteger, SUAuthorizationReply) SUAuthorizationReplySuccess = 0, SUAuthorizationReplyCancelled = 1, SUAuthorizationReplyFailure = 2, - SUAuthorizationReplyTryAgainLater = 3 + SUAuthorizationReplyAuthorizeLater = 3 }; diff --git a/InstallerLauncher/SUInstallerLauncher.m b/InstallerLauncher/SUInstallerLauncher.m index 405a8fd3..90d01c30 100644 --- a/InstallerLauncher/SUInstallerLauncher.m +++ b/InstallerLauncher/SUInstallerLauncher.m @@ -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]; diff --git a/Sparkle/SUAutomaticUpdateDriver.m b/Sparkle/SUAutomaticUpdateDriver.m index d84d4ff5..a07c7013 100644 --- a/Sparkle/SUAutomaticUpdateDriver.m +++ b/Sparkle/SUAutomaticUpdateDriver.m @@ -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]; } diff --git a/Sparkle/SUBasicUpdateDriver.m b/Sparkle/SUBasicUpdateDriver.m index 7859d063..0daca9f4 100644 --- a/Sparkle/SUBasicUpdateDriver.m +++ b/Sparkle/SUBasicUpdateDriver.m @@ -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 { diff --git a/Sparkle/SUCoreBasedUpdateDriver.m b/Sparkle/SUCoreBasedUpdateDriver.m index aaad1867..5ab29075 100644 --- a/Sparkle/SUCoreBasedUpdateDriver.m +++ b/Sparkle/SUCoreBasedUpdateDriver.m @@ -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]; } diff --git a/Sparkle/SUErrors.h b/Sparkle/SUErrors.h index a5dc353d..ec68ebac 100644 --- a/Sparkle/SUErrors.h +++ b/Sparkle/SUErrors.h @@ -55,7 +55,7 @@ typedef NS_ENUM(OSStatus, SUError) { SUInstallationError = 4005, SUDowngradeError = 4006, SUInstallationCancelledError = 4007, - SUInstallationTryAgainLaterError = 4008 + SUInstallationAuthorizeLaterError = 4008 }; #endif diff --git a/Sparkle/SUInstallerDriver.m b/Sparkle/SUInstallerDriver.m index 8e079045..3d31944a 100644 --- a/Sparkle/SUInstallerDriver.m +++ b/Sparkle/SUInstallerDriver.m @@ -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]; diff --git a/Sparkle/SUUIBasedUpdateDriver.m b/Sparkle/SUUIBasedUpdateDriver.m index c5d80d7e..4c092e28 100644 --- a/Sparkle/SUUIBasedUpdateDriver.m +++ b/Sparkle/SUUIBasedUpdateDriver.m @@ -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:^{