mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-29 05:24:26 +00:00
Renamed callbacks
This commit is contained in:
1 parent
23b2b49663
commit
5ee02e954e
6 files changed
+9
-9
No files matched your search
Vendored
+2
-2
@@ -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
|
||||
|
||||
Vendored
+1
-1
@@ -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];
|
||||
|
||||
Vendored
+1
-1
@@ -139,7 +139,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
[self notifyDelegateOfSuccess];
|
||||
[self unarchiverDidFinish];
|
||||
goto finally;
|
||||
|
||||
reportError:
|
||||
|
||||
Vendored
+1
-1
@@ -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]}];
|
||||
|
||||
Vendored
+2
-2
@@ -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:)]) {
|
||||
|
||||
Vendored
+2
-2
@@ -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
|
||||
Reference in new issue
Block a user