Renamed callbacks

This commit is contained in:
Kornel Lesiński committed 2016-12-21 15:22:59 +01:00
1 parent 23b2b49663
commit 5ee02e954e
6 files changed
+9 -9

No files matched your search

+2 -2
View File
@@ -356,7 +356,7 @@
[self installWithToolAndRelaunch:YES];
}
- (void)unarchiverDidFail:(SUUnarchiver *)__unused ua
- (void)unarchiverDidFail:(NSError *)err
{
// No longer needed
self.updateValidator = nil;
@@ -366,7 +366,7 @@
return;
}
[self abortUpdateWithError:[NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey: SULocalizedString(@"An error occurred while extracting the archive. Please try again later.", nil) }]];
[self abortUpdateWithError:err];
}
- (void)installWithToolAndRelaunch:(BOOL)relaunch
+1 -1
View File
@@ -71,7 +71,7 @@
BOOL success = applyBinaryDelta(sourcePath, targetPath, self.archivePath, NO, &applyDiffError);
if (success) {
[[self class] updateSpotlightImportersAtBundlePath:targetPath];
[self notifyDelegateOfSuccess];
[self unarchiverDidFinish];
}
else {
[self unarchiverDidFailWithError:applyDiffError];
+1 -1
View File
@@ -139,7 +139,7 @@
}
}
[self notifyDelegateOfSuccess];
[self unarchiverDidFinish];
goto finally;
reportError:
+1 -1
View File
@@ -104,7 +104,7 @@
if ([task terminationStatus] == 0) {
if (bytesRead == expectedLength) {
[self notifyDelegateOfSuccess];
[self unarchiverDidFinish];
return;
} else {
error = [NSError errorWithDomain:SUSparkleErrorDomain code:SUUnarchivingError userInfo:@{ NSLocalizedDescriptionKey:[NSString stringWithFormat:@"Extraction failed, command '%@' got only %ld of %ld bytes", command, (long)bytesRead, (long)expectedLength]}];
+2 -2
View File
@@ -67,7 +67,7 @@
}
}
- (void)notifyDelegateOfSuccess
- (void)unarchiverDidFinish
{
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(unarchiverDidFinish:)]) {
@@ -76,7 +76,7 @@
});
}
- (void)unarchiverDidFailWithError:(NSError *)error
- (void)unarchiverDidFail:(NSError *)reason
{
dispatch_async(dispatch_get_main_queue(), ^{
if ([self.delegate respondsToSelector:@selector(unarchiverDidFail:)]) {
+2 -2
View File
@@ -19,8 +19,8 @@
- (instancetype)initWithPath:(NSString *)archive hostBundlePath:(NSString *)host;
- (void)notifyDelegateOfProgress:(double)progress;
- (void)notifyDelegateOfSuccess;
- (void)unarchiverDidFailWithError:(NSError *)error;
- (void)unarchiverDidFinish;
- (void)unarchiverDidFailWithError:(NSError *)err;
@end
#endif