no-op if the pending update is already installed

This commit is contained in:
Geoffrey Goh
2016-06-29 15:54:45 -07:00
parent e4f3575cc4
commit 31e1b8ca9d
2 changed files with 12 additions and 0 deletions

View File

@@ -454,6 +454,11 @@ static NSString *const UnzippedFolderName = @"unzipped";
return;
}
if (packageHash && [packageHash isEqualToString:info[@"currentPackage"]]) {
// The current package is already the one being installed, so we should no-op.
return;
}
if (removePendingUpdate) {
NSString *currentPackageFolderPath = [self getCurrentPackageFolderPath:error];
if (!*error && currentPackageFolderPath) {