Distinguish between install path found and update being a package

This commit is contained in:
Zorg committed 2015-05-04 22:49:57 -04:00
1 parent 19fdb9276d
commit 87da4cc0f2
3 files changed
+8 -9

No files matched your search

+7 -1
View File
@@ -228,8 +228,14 @@
return NO;
}
NSString *newBundlePath = [SUInstaller appPathInUpdateFolder:extractedPath forHost:self.host];
BOOL isPackage = NO;
NSString *newBundlePath = [SUInstaller installSourcePathInUpdateFolder:extractedPath forHost:self.host isPackage:&isPackage isGuided:NULL];
if (!newBundlePath) {
SULog(@"No suitable install is found in the update. The update will be rejected.");
return NO;
}
if (isPackage) {
return canValidateByDSASignature;
}
+1 -1
View File
@@ -15,7 +15,7 @@
@class SUHost;
@interface SUInstaller : NSObject
+ (NSString *)appPathInUpdateFolder:(NSString *)updateFolder forHost:(SUHost *)host;
+ (NSString *)installSourcePathInUpdateFolder:(NSString *)inUpdateFolder forHost:(SUHost *)host isPackage:(BOOL *)isPackagePtr isGuided:(BOOL *)isGuidedPtr;
+ (void)installFromUpdateFolder:(NSString *)updateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler;
+ (void)finishInstallationToPath:(NSString *)installationPath withResult:(BOOL)result error:(NSError *)error completionHandler:(void (^)(NSError *))completionHandler;
+ (NSString *)updateFolder;
-7
View File
@@ -121,13 +121,6 @@ static NSString *sUpdateFolder = nil;
return newAppDownloadPath;
}
+ (NSString *)appPathInUpdateFolder:(NSString *)updateFolder forHost:(SUHost *)host
{
BOOL isPackage = NO;
NSString *path = [self installSourcePathInUpdateFolder:updateFolder forHost:host isPackage:&isPackage isGuided:nil];
return isPackage ? nil : path;
}
+ (void)installFromUpdateFolder:(NSString *)inUpdateFolder overHost:(SUHost *)host installationPath:(NSString *)installationPath versionComparator:(id<SUVersionComparison>)comparator completionHandler:(void (^)(NSError *))completionHandler
{
BOOL isPackage = NO;