From 994e1784f49e189210e08ccc093db0cfca23fbf5 Mon Sep 17 00:00:00 2001 From: Fancy <Fancy.fx@outlook.com> Date: 星期三, 04 九月 2024 10:50:00 +0800 Subject: [PATCH] remove time !="" --- pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java b/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java index 1750c48..50d62d5 100644 --- a/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java +++ b/pms-parent/pms-web-file/src/main/java/com/dy/dyFile/files/FileCtrl.java @@ -71,11 +71,11 @@ }else{ zipFileInput = ZipImg.zipToJpg(fPic, photoZipWidth, photoZipWidth) ; } - boolean zipOk = new FileUtil().saveFile(zipFilePath, zipFileInput) ; - //濡傛灉鍘嬬缉鏂囦欢涓嶅瓨鍦ㄦ垨鐢熸垚澶辫触锛屽垯澶嶅埗婧愭枃浠� - File zipFile = new File(zipFilePath); - if (!zipFile.exists() || zipFile.length()==0) { - zipOk = new FileUtil().saveFile(zipFilePath, file.getInputStream()) ; + if(zipFileInput.available() > 0){ + new FileUtil().saveFile(zipFilePath, zipFileInput) ; + }else{ + //濡傛灉鍘嬬缉鏂囦欢涓嶅瓨鍦ㄦ垨鐢熸垚澶辫触锛屽垯澶嶅埗婧愭枃浠� + new FileUtil().saveFile(zipFilePath, file.getInputStream()) ; } } } -- Gitblit v1.8.0