lyhzzz 2 vuotta sitten
vanhempi
commit
01ca68b6dd

+ 2 - 8
src/main/java/com/fdkankan/ucenter/service/impl/SceneCommonService.java

@@ -224,21 +224,15 @@ public class SceneCommonService {
     public void delLink(String path) {
         String panPath = path +"/panorama";
         File file = new File(panPath);
-        log.info("delLink--filePath:{}",path);
-        log.info("delLink--filePath:{}",file.exists());
         if(file.exists()){
             File[] files = file.listFiles();
-            log.info("delLink--filePath:{}",files);
-            log.info("delLink--filePath:{}",files.length);
             if(files == null || files.length == 0){
                 return;
             }
             for (File file1 : files) {
-                log.info("delLink--filePath:{}",file1.getPath());
                 String linkPath =file1.getPath() + "/capture";
-                if(new File(linkPath).exists()){
-                    org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
-                }
+                log.info("delLink--filePath:{}",linkPath);
+                org.apache.commons.io.FileUtils.deleteQuietly(new File(linkPath));
             }
         }
     }

+ 0 - 1
src/main/java/com/fdkankan/ucenter/service/impl/ScenePlusServiceImpl.java

@@ -304,7 +304,6 @@ public class ScenePlusServiceImpl extends ServiceImpl<IScenePlusMapper, ScenePlu
         String oldPath = SceneResourcePath.nasBasePath + oldNum;
         String newPath = SceneResourcePath.nasBasePath + newNum;
         if(new File(oldPath).exists()){
-            sceneCommonService.delLink(oldPath);
             FileUtil.copyContent(new File(oldPath), new File(newPath),true);
         }
         String oldPath_v4 = SceneResourcePath.nasBasePath_v4 + oldNum;