From 1175dd747d955b2ba4e105071055ea99ca25a294 Mon Sep 17 00:00:00 2001 From: shiziyuan9527 Date: Thu, 22 Jul 2021 17:29:01 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E7=BC=BA=E9=99=B7=E7=AE=A1=E7=90=86):=20?= =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=B8=A6=E6=9C=89=E5=9B=BE=E7=89=87=E7=9A=84?= =?UTF-8?q?=E7=BC=BA=E9=99=B7=E5=88=B0=E7=A6=85=E9=81=93=E6=97=B6=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/io/metersphere/track/issue/ZentaoPlatform.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java b/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java index 19e75f2043..9a74a099be 100644 --- a/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java +++ b/backend/src/main/java/io/metersphere/track/issue/ZentaoPlatform.java @@ -381,6 +381,10 @@ public class ZentaoPlatform extends AbstractIssuePlatform { // upload zentao String id = uploadFile(mdImage.getBody()); // todo delete local file + int index = fileName.lastIndexOf("."); + if (index != -1) { + fileName = fileName.substring(0, index); + } // replace id zentaoSteps = zentaoSteps.replaceAll(Pattern.quote(fileName), id); }