This repository was archived by the owner on May 20, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -206,16 +206,16 @@ + (void)downloadPackage:(NSDictionary *)updatePackage
206206 NSString *newPackageFolderPath = [self getPackageFolderPath: updatePackage[@" packageHash" ]];
207207 NSError *error;
208208
209- if (![[NSFileManager defaultManager ] fileExistsAtPath: [self getCodePushPath ]]) {
210- [[NSFileManager defaultManager ] createDirectoryAtPath: [self getCodePushPath ]
211- withIntermediateDirectories: YES
212- attributes: nil
213- error: &error];
214- } else if ([[NSFileManager defaultManager ] fileExistsAtPath: newPackageFolderPath]) {
209+ if ([[NSFileManager defaultManager ] fileExistsAtPath: newPackageFolderPath]) {
215210 // This removes any stale data in newPackageFolderPath that could have been left
216211 // uncleared due to a crash or error during the download or install process.
217212 [[NSFileManager defaultManager ] removeItemAtPath: newPackageFolderPath
218213 error: &error];
214+ } else if (![[NSFileManager defaultManager ] fileExistsAtPath: [self getCodePushPath ]]) {
215+ [[NSFileManager defaultManager ] createDirectoryAtPath: [self getCodePushPath ]
216+ withIntermediateDirectories: YES
217+ attributes: nil
218+ error: &error];
219219 }
220220
221221 if (error) {
You can’t perform that action at this time.
0 commit comments