Remove unused installationPath variable from normalization changes

This commit is contained in:
Zorg
2021-05-14 22:09:41 -07:00
parent 039adc1ef2
commit 8dc4e78cb2
7 changed files with 6 additions and 19 deletions
-4
View File
@@ -561,10 +561,6 @@ static const NSTimeInterval SUDisplayProgressTimeDelay = 0.7;
return;
}
// Used later for relaunching
// Compute this now before we set this installer property to nil
NSString *installationPath = [self.installer installationPath];
NSError *thirdStageError = nil;
if (![self.installer performFinalInstallationProgressBlock:nil error:&thirdStageError]) {
[self.installer performCleanup];
+1 -1
View File
@@ -21,6 +21,6 @@ A guided installation can be started by applications other than the application
@interface SUGuidedPackageInstaller : NSObject <SUInstallerProtocol>
- (instancetype)initWithPackagePath:(NSString *)packagePath installationPath:(NSString *)installationPath;
- (instancetype)initWithPackagePath:(NSString *)packagePath;
@end
+1 -4
View File
@@ -16,21 +16,18 @@
@interface SUGuidedPackageInstaller ()
@property (nonatomic, readonly, copy) NSString *packagePath;
@property (nonatomic, readonly, copy) NSString *installationPath;
@end
@implementation SUGuidedPackageInstaller
@synthesize packagePath = _packagePath;
@synthesize installationPath = _installationPath;
- (instancetype)initWithPackagePath:(NSString *)packagePath installationPath:(NSString *)installationPath
- (instancetype)initWithPackagePath:(NSString *)packagePath
{
self = [super init];
if (self != nil) {
_packagePath = [packagePath copy];
_installationPath = [installationPath copy];
}
return self;
}
+2 -2
View File
@@ -135,7 +135,7 @@
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Found guided package installer but '%@=%@' was probably missing in the appcast item enclosure", SUAppcastAttributeInstallationType, SPUInstallationTypeGuidedPackage] }];
}
} else {
installer = [[SUGuidedPackageInstaller alloc] initWithPackagePath:newDownloadPath installationPath:host.bundlePath];
installer = [[SUGuidedPackageInstaller alloc] initWithPackagePath:newDownloadPath];
}
} else if (isPackage) {
if (![expectedInstallationType isEqualToString:SPUInstallationTypeInteractivePackage]) {
@@ -143,7 +143,7 @@
*error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUInstallationError userInfo:@{ NSLocalizedDescriptionKey: [NSString stringWithFormat:@"Found package installer but '%@=%@' was probably missing in the appcast item enclosure", SUAppcastAttributeInstallationType, SPUInstallationTypeInteractivePackage] }];
}
} else {
installer = [[SUPackageInstaller alloc] initWithPackagePath:newDownloadPath installationPath:host.bundlePath];
installer = [[SUPackageInstaller alloc] initWithPackagePath:newDownloadPath];
}
} else {
if (![expectedInstallationType isEqualToString:SPUInstallationTypeApplication]) {
-3
View File
@@ -33,9 +33,6 @@ NS_ASSUME_NONNULL_BEGIN
// Should be thread safe
- (BOOL)canInstallSilently;
// The destination and installation path of the bundle being updated
- (NSString *)installationPath;
@end
NS_ASSUME_NONNULL_END
+1 -1
View File
@@ -14,6 +14,6 @@
@interface SUPackageInstaller : NSObject <SUInstallerProtocol>
- (instancetype)initWithPackagePath:(NSString *)packagePath installationPath:(NSString *)installationPath;
- (instancetype)initWithPackagePath:(NSString *)packagePath;
@end
+1 -4
View File
@@ -17,7 +17,6 @@
@interface SUPackageInstaller ()
@property (nonatomic, readonly, copy) NSString *packagePath;
@property (nonatomic, readonly, copy) NSString *installationPath;
@end
@@ -26,14 +25,12 @@
static NSString *SUOpenUtilityPath = @"/usr/bin/open";
@synthesize packagePath = _packagePath;
@synthesize installationPath = _installationPath;
- (instancetype)initWithPackagePath:(NSString *)packagePath installationPath:(NSString *)installationPath
- (instancetype)initWithPackagePath:(NSString *)packagePath
{
self = [super init];
if (self != nil) {
_packagePath = [packagePath copy];
_installationPath = [installationPath copy];
}
return self;
}