mirror of
https://gitcode.com/gh_mirrors/re/react-native-pushy.git
synced 2025-09-18 17:40:41 +08:00
Compare commits
4 Commits
v5.11.0-be
...
v5.11.0-be
Author | SHA1 | Date | |
---|---|---|---|
![]() |
49e585a561 | ||
![]() |
0e89b270cc | ||
![]() |
7c8e75587b | ||
![]() |
84fee71df6 |
@@ -510,27 +510,29 @@ class DownloadTask extends AsyncTask<DownloadTaskParams, long[], Void> {
|
|||||||
if (UpdateContext.DEBUG) {
|
if (UpdateContext.DEBUG) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
File targetToClean = params[0].targetFile;
|
|
||||||
switch (taskType) {
|
switch (taskType) {
|
||||||
case DownloadTaskParams.TASK_TYPE_PATCH_FULL:
|
case DownloadTaskParams.TASK_TYPE_PATCH_FULL:
|
||||||
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK:
|
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_APK:
|
||||||
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK:
|
case DownloadTaskParams.TASK_TYPE_PATCH_FROM_PPK:
|
||||||
try {
|
try {
|
||||||
removeDirectory(targetToClean);
|
removeDirectory(params[0].unzipDirectory);
|
||||||
} catch (IOException ioException) {
|
} catch (IOException ioException) {
|
||||||
ioException.printStackTrace();
|
ioException.printStackTrace();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD:
|
case DownloadTaskParams.TASK_TYPE_PLAIN_DOWNLOAD:
|
||||||
if (targetToClean.exists()) {
|
// if (targetToClean.exists()) {
|
||||||
targetToClean.delete();
|
params[0].targetFile.delete();
|
||||||
}
|
// }
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
Log.e("pushy", "download task failed", e);
|
Log.e("pushy", "download task failed", e);
|
||||||
params[0].listener.onDownloadFailed(e);
|
|
||||||
|
if (params[0].listener != null) {
|
||||||
|
params[0].listener.onDownloadFailed(e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "react-native-update",
|
"name": "react-native-update",
|
||||||
"version": "5.11.0-beta0",
|
"version": "5.11.0-beta2",
|
||||||
"description": "react-native hot update",
|
"description": "react-native hot update",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
Reference in New Issue
Block a user