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

Compare commits

..

4 Commits

Author SHA1 Message Date
sunnylqm
49e585a561 v5.11.0-beta2 2021-03-26 18:12:52 +08:00
sunnylqm
0e89b270cc Check download listener 2021-03-26 18:12:25 +08:00
sunnylqm
7c8e75587b v5.11.0-beta1 2021-01-20 23:38:42 +08:00
sunnylqm
84fee71df6 Fix cleanup target dir 2021-01-20 23:38:21 +08:00
2 changed files with 9 additions and 7 deletions

View File

@@ -510,28 +510,30 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
if (UpdateContext.DEBUG) {
e.printStackTrace();
}
File targetToClean = params[0].targetFile;
switch (taskType) {
case DownloadTaskParams.TASK_TYPE_PATCH_FULL:
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK:
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK:
try {
removeDirectory(targetToClean);
removeDirectory(params[0].unzipDirectory);
} catch (IOException ioException) {
ioException.printStackTrace();
}
break;
case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD:
if (targetToClean.exists()) {
targetToClean.delete();
}
// if (targetToClean.exists()) {
params[0].targetFile.delete();
// }
break;
default:
break;
}
Log.e("pushy", "download task failed", e);
if (params[0].listener != null) {
params[0].listener.onDownloadFailed(e);
}
}
return null;
}

View File

@@ -1,6 +1,6 @@
{
"name": "react-native-update",
"version": "5.11.0-beta0",
"version": "5.11.0-beta2",
"description": "react-native hot update",
"main": "lib/index.js",
"scripts": {