dengsixing 9 달 전
부모
커밋
ff077ec426
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      src/main/java/com/fdkankan/scene/oss/OssUtil.java

+ 6 - 3
src/main/java/com/fdkankan/scene/oss/OssUtil.java

@@ -302,9 +302,12 @@ public class OssUtil {
                 return aliyunOssTemplate.copyObject(oldPath, newPath);
             }
         }else{
-            File copy = FileUtil.copyContent(new File(FdkkLaserConfig.getProfile(prefix) + File.separator + oldPath),
-                    new File(FdkkLaserConfig.getProfile(prefix) + File.separator + newPath), true);
-            return copy.exists();
+            if(new File(FdkkLaserConfig.getProfile(prefix) + File.separator + oldPath).exists()){
+                File copy = FileUtil.copyContent(new File(FdkkLaserConfig.getProfile(prefix) + File.separator + oldPath),
+                        new File(FdkkLaserConfig.getProfile(prefix) + File.separator + newPath), true);
+                return copy.exists();
+            }
+            return false;
         }
     }