diff --git a/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java b/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java index 05780a6b0..a845759f7 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/share/action/InstallComponentAction.java @@ -120,7 +120,7 @@ public class InstallComponentAction extends UpdateAction { private boolean containRues(File[] chosenFiles) { for (File file : chosenFiles) { - if (file.getName().endsWith(ReuxUtils.REUS_SUFFIX)) + if (ReuxUtils.isReusFile(file)) return true; } return false; @@ -142,8 +142,7 @@ public class InstallComponentAction extends UpdateAction { return false; } ShareComponentUtils.checkReadMe(); - boolean isReus = chosenFile.getName().endsWith(ReuxUtils.REUS_SUFFIX); - return isReus ? InstallUtils.installReusFile(chosenFile, installTime, failList) : InstallUtils.installReuFile(chosenFile, installTime, failList); + return ReuxUtils.isReusFile(chosenFile) ? InstallUtils.installReusFile(chosenFile, installTime, failList) : InstallUtils.installReuFile(chosenFile, installTime, failList); } private static class InstallBackInfo {