lyhzzz 6 달 전
부모
커밋
d54cb3b3be
1개의 변경된 파일4개의 추가작업 그리고 5개의 파일을 삭제
  1. 4 5
      src/main/java/com/fdkankan/fusion/down/CaseDownService.java

+ 4 - 5
src/main/java/com/fdkankan/fusion/down/CaseDownService.java

@@ -436,13 +436,12 @@ public class CaseDownService {
             if(res.contains(".json") || res.contains(".shp") || res.contains(".obj")){
                 res = new File(res).getParentFile().getPath();
             }
-            File file = new File(path + "/oss/" + res);
-            if(file.isDirectory()){
-                log.info("---------------------"+file.getParentFile().getPath());
-                ShellUtil.yunDownload(res, file.getParentFile().getPath());
+            String desPath = path + "/oss/" + res;
+            if(!desPath.contains(".")){
+                ShellUtil.yunDownload(res, new File(desPath).getParentFile().getPath());
                 return;
             }
-            ShellUtil.yunDownload(res, path +"/oss/" + res);
+            ShellUtil.yunDownload(res, desPath);
         }
     }
     public void downResources(Integer caseId,String urls) {