From e613652e677ce1bbabb3d524bb2e573fd972e82e Mon Sep 17 00:00:00 2001 From: yjb Date: Sat, 28 May 2022 09:11:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E9=94=AE=E6=94=B9=E5=8C=85=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=96=B0=E9=A1=B9=E7=9B=AE=E7=9B=AE=E5=BD=95=E6=A3=80?= =?UTF-8?q?=E6=B5=8B=EF=BC=8C=E8=8B=A5=E6=96=B0=E7=9B=AE=E5=BD=95=E5=AD=98?= =?UTF-8?q?=E5=9C=A8=E5=88=99=E9=80=80=E5=87=BA=E7=A8=8B=E5=BA=8F=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/test/java/cn/iocoder/yudao/ProjectReactor.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java index 2cb2f9640..fb89612a3 100644 --- a/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java +++ b/yudao-server/src/test/java/cn/iocoder/yudao/ProjectReactor.java @@ -48,8 +48,12 @@ public class ProjectReactor { String packageNameNew = "cn.start.pp"; String titleNew = "土豆管理系统"; String projectBaseDirNew = projectBaseDir + "-new"; // 一键改名后,“新”项目所在的目录 - log.info("[main][新项目路径地址 ({})]", projectBaseDirNew); - + log.info("[main][检测新项目目录 ({})是否存在]", projectBaseDirNew); + if (FileUtil.exist(projectBaseDirNew)) { + log.info("[main][新项目目录检测 ({})已存在,请更改新的目录,程序退出!]", projectBaseDirNew); + return; + } + log.info("[main][完成新项目目录检测,新项目路径地址 ({})]", projectBaseDirNew); // 获得需要复制的文件 log.info("[main][开始获得需要重写的文件,预计需要 10-20 秒]"); Collection files = listFiles(projectBaseDir);