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
87
87
NSString *packageDate = [currentPackageMetadata objectForKey: BinaryBundleDateKey];
88
88
NSString *packageAppVersion = [currentPackageMetadata objectForKey: @" appVersion" ];
89
89
90
- if ([[self modifiedDateStringOfFileAtUrl : binaryBundleURL] isEqualToString: packageDate] && ([CodePush isUsingTestConfiguration ] ||[binaryAppVersion isEqualToString: packageAppVersion])) {
90
+ if ([[self modifiedDateStringOfFileAtURL : binaryBundleURL] isEqualToString: packageDate] && ([CodePush isUsingTestConfiguration ] ||[binaryAppVersion isEqualToString: packageAppVersion])) {
91
91
// Return package file because it is newer than the app store binary's JS bundle
92
92
NSURL *packageUrl = [[NSURL alloc ] initFileURLWithPath: packageFile];
93
93
NSLog (logMessageFormat, packageUrl);
@@ -397,7 +397,7 @@ - (void)savePendingUpdate:(NSString *)packageHash
397
397
NSDictionary *mutableUpdatePackage = [updatePackage mutableCopy ];
398
398
NSURL *binaryBundleURL = [CodePush binaryBundleURL ];
399
399
if (binaryBundleURL != nil ) {
400
- [mutableUpdatePackage setValue: [CodePush modifiedDateStringOfFileAtUrl : binaryBundleURL]
400
+ [mutableUpdatePackage setValue: [CodePush modifiedDateStringOfFileAtURL : binaryBundleURL]
401
401
forKey: BinaryBundleDateKey];
402
402
}
403
403
Original file line number Diff line number Diff line change @@ -229,6 +229,8 @@ + (void)downloadPackage:(NSDictionary *)updatePackage
229
229
NSMutableDictionary * mutableUpdatePackage = [updatePackage mutableCopy ];
230
230
if (isZip) {
231
231
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.
232
234
[[NSFileManager defaultManager ] removeItemAtPath: unzippedFolderPath
233
235
error: &error];
234
236
if (error) {
You can’t perform that action at this time.
0 commit comments