1
0
mirror of https://gitcode.com/gh_mirrors/re/react-native-pushy.git synced 2025-09-17 19:46:10 +08:00
Code Issues Packages Projects Releases Wiki Activity GitHub Gitee

bug fixed

This commit is contained in:
lvbingru
2016-04-06 13:05:52 +08:00
parent 11ef71b978
commit e2e95d6a23
3 changed files with 68 additions and 3 deletions

View File

@@ -361,8 +361,11 @@ RCT_EXPORT_METHOD(markSuccess)
callback(error);
return;
}
NSDictionary *copies = json[@"copies"];
[_fileManager copyFiles:copies fromDir:sourceOrigin toDir:unzipDir completionHandler:^(NSError *error) {
NSDictionary *deletes = json[@"deletes"];
[_fileManager copyFiles:copies fromDir:sourceOrigin toDir:unzipDir deletes:deletes completionHandler:^(NSError *error) {
if (error) {
callback(error);
}
@@ -392,7 +395,7 @@ RCT_EXPORT_METHOD(markSuccess)
for(NSString *fileName in list) {
if (![fileName isEqualToString:curVersion]) {
[_fileManager removeFile:curVersion completionHandler:nil];
[_fileManager removeFile:[downloadDir stringByAppendingPathComponent:fileName] completionHandler:nil];
}
}
}