lyhzzz il y a 2 ans
Parent
commit
9b15312ca1

+ 0 - 11
src/main/java/com/fdkankan/fusion/common/util/OBJToGLBUtil.java

@@ -135,17 +135,6 @@ public class OBJToGLBUtil {
         //ShellUtil.execCmd("cp -r " + objPath + " " + dockerPath+ objPathFile.getName()   );
         File file = new File(targetPath);
         FileUtil.copyContent(objPathFile,file,true);
-        String dirName = "";
-        if(file.exists()){
-            File[] files = file.listFiles();
-            for (File file1 : files) {
-                if(file1.isDirectory()){
-                    dirName = file1.getName();
-                }
-            }
-        }
-        targetPath +="/" + dirName;
-        sourcePath +="/" + dirName;
 
         String cmd = ShellCmd.osgbTob3dmCmd.replaceAll("@path",FilePath.MNT_BASE_PATH);
         cmd =cmd.replaceAll("@inputFile",targetPath);

+ 6 - 6
src/main/java/com/fdkankan/fusion/service/impl/ModelServiceImpl.java

@@ -246,12 +246,12 @@ public class ModelServiceImpl extends ServiceImpl<IModelMapper, Model> implement
                     if(mntFile!=null){
                        FileUtil.del(mntFile.getParentFile());
                     }
-//                    if(b3dmFile != null){
-//                        FileUtil.del(b3dmFile.getParentFile());
-//                    }
-//                    if(osgbFile != null){
-//                        FileUtil.del(osgbFile.getParentFile());
-//                    }
+                    if(b3dmFile != null){
+                        FileUtil.del(b3dmFile.getParentFile());
+                    }
+                    if(osgbFile != null){
+                        FileUtil.del(osgbFile.getParentFile());
+                    }
                 }
             }, executor).whenComplete((reslut, e) -> {
                 log.info("uploadObj--ThreadEnd-modeId:{}",model.getModelId());