|
@@ -203,6 +203,7 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
String num = downLoadTaskBean.getNum();
|
|
|
//zip包路径
|
|
|
String zipPath = null;
|
|
|
+ ZipOutputStream out = null;
|
|
|
|
|
|
try {
|
|
|
|
|
@@ -227,7 +228,7 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
if(!zipFile.getParentFile().exists()){
|
|
|
zipFile.getParentFile().mkdirs();
|
|
|
}
|
|
|
- ZipOutputStream out = new ZipOutputStream(zipFile);
|
|
|
+ out = new ZipOutputStream(zipFile);
|
|
|
|
|
|
String sceneJsonData = fYunFileService.getFileContent(bucket, String.format(UploadFilePath.DATA_VIEW_PATH, num) + "scene.json");
|
|
|
JSONObject sceneJson = JSONUtil.parseObj(sceneJsonData);
|
|
@@ -283,7 +284,8 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
this.updateProgress( null, num, SceneDownloadProgressStatus.DOWNLOAD_FAILED.code(), null, "v4");
|
|
|
throw e;
|
|
|
}finally {
|
|
|
- if(StrUtil.isNotBlank(zipPath)){
|
|
|
+ if(Objects.nonNull(out)){
|
|
|
+ out.close();
|
|
|
//删除本地zip包
|
|
|
FileUtils.deleteFile(zipPath);
|
|
|
}
|
|
@@ -295,6 +297,7 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
String num = downLoadTaskBean.getSceneNum();
|
|
|
//zip包路径
|
|
|
String zipPath = null;
|
|
|
+ ZipOutputStream out = null;
|
|
|
|
|
|
try {
|
|
|
|
|
@@ -319,7 +322,7 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
if(!zipFile.getParentFile().exists()){
|
|
|
zipFile.getParentFile().mkdirs();
|
|
|
}
|
|
|
- ZipOutputStream out = new ZipOutputStream(zipFile);
|
|
|
+ out = new ZipOutputStream(zipFile);
|
|
|
|
|
|
int imagesVersion =0;
|
|
|
String resolution = "2k";
|
|
@@ -362,7 +365,8 @@ public class SceneDownloadHandlerServiceImpl {
|
|
|
this.updateProgress( null, num, SceneDownloadProgressStatus.DOWNLOAD_FAILED.code(), null, "v3");
|
|
|
throw e;
|
|
|
}finally {
|
|
|
- if(StrUtil.isNotBlank(zipPath)){
|
|
|
+ if(Objects.nonNull(out)){
|
|
|
+ out.close();
|
|
|
//删除本地zip包
|
|
|
FileUtils.deleteFile(zipPath);
|
|
|
}
|