This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ + (NSURL *)bundleURLForResource:(NSString *)resourceName
8787 NSString *packageDate = [currentPackageMetadata objectForKey: BinaryBundleDateKey];
8888 NSString *packageAppVersion = [currentPackageMetadata objectForKey: @" appVersion" ];
8989
90- if ([[self modifiedDateStringOfFileAtUrl : binaryBundleURL] isEqualToString: packageDate] && ([CodePush isUsingTestConfiguration ] ||[binaryAppVersion isEqualToString: packageAppVersion])) {
90+ if ([[self modifiedDateStringOfFileAtURL : binaryBundleURL] isEqualToString: packageDate] && ([CodePush isUsingTestConfiguration ] ||[binaryAppVersion isEqualToString: packageAppVersion])) {
9191 // Return package file because it is newer than the app store binary's JS bundle
9292 NSURL *packageUrl = [[NSURL alloc ] initFileURLWithPath: packageFile];
9393 NSLog (logMessageFormat, packageUrl);
@@ -397,7 +397,7 @@ - (void)savePendingUpdate:(NSString *)packageHash
397397 NSDictionary *mutableUpdatePackage = [updatePackage mutableCopy ];
398398 NSURL *binaryBundleURL = [CodePush binaryBundleURL ];
399399 if (binaryBundleURL != nil ) {
400- [mutableUpdatePackage setValue: [CodePush modifiedDateStringOfFileAtUrl : binaryBundleURL]
400+ [mutableUpdatePackage setValue: [CodePush modifiedDateStringOfFileAtURL : binaryBundleURL]
401401 forKey: BinaryBundleDateKey];
402402 }
403403
Original file line number Diff line number Diff line change @@ -229,6 +229,8 @@ + (void)downloadPackage:(NSDictionary *)updatePackage
229229 NSMutableDictionary * mutableUpdatePackage = [updatePackage mutableCopy ];
230230 if (isZip) {
231231 if ([[NSFileManager defaultManager ] fileExistsAtPath: unzippedFolderPath]) {
232+ // This removes any unzipped download data that could have been left
233+ // uncleared due to a crash or error during the download process.
232234 [[NSFileManager defaultManager ] removeItemAtPath: unzippedFolderPath
233235 error: &error];
234236 if (error) {
You can’t perform that action at this time.
0 commit comments