From 20fbc3032c9b86236fe2e6c46d869415ba989a3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=2EYing-=E5=BA=94=E5=BF=97=E6=B5=A9?= Date: Tue, 3 Jan 2023 15:31:31 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-87787=20=E6=96=B0=E5=A2=9E=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E6=8A=A5=E9=94=99=EF=BC=8C=20File=20not=20exists:/com?= =?UTF-8?q?/fr/design/images/platform/platform?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fr/design/mainframe/platform/ServicePlatformAction.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java index 7912354501..c6dc9a9b66 100644 --- a/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java +++ b/designer-base/src/main/java/com/fr/design/mainframe/platform/ServicePlatformAction.java @@ -20,7 +20,7 @@ import java.net.URI; public class ServicePlatformAction extends UpdateAction { public ServicePlatformAction() { this.setName(Toolkit.i18nText("Fine-Design_Basic_Service_Platform_Title")); - this.setSmallIcon("/com/fr/design/images/platform/platform"); + this.setSmallIcon("/com/fr/design/images/platform/platform", false); } @Override From 8db25859bb486704d1669da8497ddd2377b8b4d1 Mon Sep 17 00:00:00 2001 From: roger Date: Wed, 4 Jan 2023 10:19:09 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-87843=20=E5=A4=8D=E5=88=B6=E7=89=B9?= =?UTF-8?q?=E5=AE=9A=E6=96=87=E4=BB=B6=E5=A4=B9=E5=90=8D=E7=A7=B0=EF=BC=8C?= =?UTF-8?q?=E2=80=9C=E7=9A=84=E5=89=AF=E6=9C=AC=E2=80=9D=E5=90=8E=E7=BC=80?= =?UTF-8?q?=E4=BD=8D=E7=BD=AE=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/file/FileOperationHelper.java | 21 +++++++++++-------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/file/FileOperationHelper.java b/designer-base/src/main/java/com/fr/design/file/FileOperationHelper.java index 21eb34d902..a3abaf4606 100644 --- a/designer-base/src/main/java/com/fr/design/file/FileOperationHelper.java +++ b/designer-base/src/main/java/com/fr/design/file/FileOperationHelper.java @@ -127,7 +127,7 @@ public class FileOperationHelper { WARNING_MESSAGE); return StringUtils.EMPTY; } - String name = getNoRepeatedName4Paste(targetDir, sourceFile.getName()); + String name = getNoRepeatedName4Paste(targetDir, sourceFile); String targetFile = StableUtils.pathJoin(targetDir, name); if (sourceFile.isDirectory()) { copyDir(sourcePath, targetFile, withCopyVcs); @@ -177,19 +177,22 @@ public class FileOperationHelper { * 重名处理 * * @param targetDir - * @param oldName + * @param sourceFile * @return */ - private String getNoRepeatedName4Paste(String targetDir, String oldName) { + private String getNoRepeatedName4Paste(String targetDir, FileNode sourceFile) { + String oldName = sourceFile.getName(); while (isNameRepeaded(targetDir, oldName)) { - int index = oldName.lastIndexOf("."); - if (index > 0) { - String oName = oldName.substring(0, index); - oName = oName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data"); - oldName = oName.concat(oldName.substring(index)); - } else { + if (sourceFile.isDirectory()) { //目录重名 oldName = oldName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data"); + } else { + int index = oldName.lastIndexOf("."); + if (index > 0) { + String oName = oldName.substring(0, index); + oName = oName + Toolkit.i18nText("Fine-Design_Table_Data_Copy_Of_Table_Data"); + oldName = oName.concat(oldName.substring(index)); + } } } return oldName;