From feed168831a9bce9a36740e63b0a22ff05bc6812 Mon Sep 17 00:00:00 2001 From: kuangshuai Date: Fri, 27 Aug 2021 19:13:42 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-58260=20=E7=BB=84=E4=BB=B6=E5=8C=85?= =?UTF-8?q?=E5=AE=89=E8=A3=85=E9=80=82=E9=85=8Dzip?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/mainframe/share/util/InstallUtils.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java index c25f53f51..610f688a4 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/util/InstallUtils.java @@ -84,7 +84,7 @@ public class InstallUtils { @Nullable private static Group createComponentGroup(String fileName) { - String groupName = fileName.substring(0, fileName.indexOf(DOT + ReuxUtils.REUS_SUFFIX)); + String groupName = createGroupName(fileName); //有重名分组则加后缀 if (DefaultShareGroupManager.getInstance().getGroup(groupName) != null) { @@ -101,6 +101,15 @@ public class InstallUtils { return DefaultShareGroupManager.getInstance().getGroup(groupName); } + private static String createGroupName(String fileName) { + for (String suffix : ReuxUtils.SUPPORT_REUS_SUFFIX) { + if (fileName.endsWith(suffix)) { + return fileName.substring(0, fileName.indexOf(DOT + suffix)); + } + } + return fileName; + } + private static boolean installReuFile(Group group, File chosenFile, long installTime) { try { if (!group.installModule(chosenFile)) {