mirror of
https://github.com/zhigang1992/react-native-code-push.git
synced 2026-06-10 23:59:42 +08:00
Merge pull request #89 from Microsoft/asset-update-bug
Delete bundle file if it already exists
This commit is contained in:
@@ -302,6 +302,14 @@ NSString * const UnzippedFolderName = @"unzipped";
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if ([[NSFileManager defaultManager] fileExistsAtPath:bundleFilePath]) {
|
||||
[[NSFileManager defaultManager] removeItemAtPath:bundleFilePath error:&error];
|
||||
if (error) {
|
||||
failCallback(error);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
[[NSFileManager defaultManager] moveItemAtPath:downloadFilePath
|
||||
toPath:bundleFilePath
|
||||
error:&error];
|
||||
|
||||
Reference in New Issue
Block a user