From 8a78af67907265a383f928ea13402e89998a6c85 Mon Sep 17 00:00:00 2001 From: "yaoh.wu" Date: Mon, 19 Nov 2018 16:10:56 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../design/actions/file/export/AbstractExportAction.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java index cbe3a1aea0..0105d7f958 100644 --- a/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/file/export/AbstractExportAction.java @@ -14,6 +14,7 @@ import com.fr.io.exporter.DesignExportType; import com.fr.log.FineLoggerFactory; import com.fr.stable.ProductConstants; import com.fr.stable.StringUtils; +import com.fr.third.jodd.io.FileNameUtil; import com.fr.workspace.WorkContext; import com.fr.workspace.server.exporter.TemplateExportOperator; @@ -115,12 +116,8 @@ public abstract class AbstractExportAction> extends JT private String getTargetFileName() { FILE source = getSource(); - // 打开文件后输出文件名修改,eg:w.cpt.doc / w.svg.doc,去掉中间的后缀名~~ w.doc String fileName = source.getName(); - if (fileName.indexOf('.') != -1) { - fileName = fileName.substring(0, fileName.lastIndexOf('.')); - } - return fileName; + return FileNameUtil.removeExtension(fileName); } private boolean processNotSaved() {