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
206
206
NSString *newPackageFolderPath = [self getPackageFolderPath: updatePackage[@" packageHash" ]];
207
207
NSError *error;
208
208
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]) {
215
210
// This removes any stale data in newPackageFolderPath that could have been left
216
211
// uncleared due to a crash or error during the download or install process.
217
212
[[NSFileManager defaultManager ] removeItemAtPath: newPackageFolderPath
218
213
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];
219
219
}
220
220
221
221
if (error) {
You can’t perform that action at this time.
0 commit comments