From 66c4c910dcfe5d955103376c4c4afc685557dc55 Mon Sep 17 00:00:00 2001 From: mac <user@users-MacBook-Pro.local> Date: 星期四, 23 十一月 2023 18:13:02 +0800 Subject: [PATCH] 2023年11月23日18:11:10 --- app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java index 18a7ce7..8136a4a 100644 --- a/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java +++ b/app/src/main/java/com/hdl/photovoltaic/other/HdlUniLogic.java @@ -567,10 +567,13 @@ HdlOtaLogic.getInstance().getDeviceDriverDownloadFile(url, new CloudCallBeak<ResponseBody>() { @Override public void onSuccess(ResponseBody responseBody) { - byte[] bytes = HdlOtaLogic.getInstance().disposeDownLoadFile(responseBody, md5); - HdlFileLogic.getInstance().deleteFile(localUrl);//鍒犻櫎鏃ф枃浠� String drivePathFileName = HdlFileLogic.getInstance().getDrivePathFileName(driverCode, version); - HdlFileLogic.getInstance().writeFile(drivePathFileName, bytes);//鍐欏叆鏂版枃浠� + boolean isBoolean = HdlOtaLogic.getInstance().disposeDownLoadFile(drivePathFileName, responseBody, md5, HdlOtaLogic.driver_type); + if (isBoolean) { + HdlFileLogic.getInstance().deleteFile(localUrl);//涓嬭浇鎴愬姛,鍒犻櫎鏃ф枃浠�; + } else { + HdlFileLogic.getInstance().deleteFile(drivePathFileName);//涓嬭浇澶辫触鍒犻櫎涓嶅畬鎴愭暟鎹�; + } HdlLogLogic.print("鍐欏叆鏂伴┍鍔ㄦ枃浠跺埌鍐呭瓨鎴愬姛.", false); } -- Gitblit v1.8.0