From c395b120cedf7c71dd1b535880c332a11b20d6d9 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 12 Jan 2023 14:58:23 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=8E=A5=E5=8F=A3=E5=AE=9A=E4=B9=89):=20?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=89=A7=E8=A1=8C=E5=9C=BA=E6=99=AF=E6=8F=90?= =?UTF-8?q?=E7=A4=BAcsv=E4=B8=8D=E5=AD=98=E5=9C=A8=E7=9A=84=E7=BC=BA?= =?UTF-8?q?=E9=99=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --bug=1021946 --user=王孝刚 【接口测试】环境变量里添加csv变量,在场景中选择这个环境,执行场景,提示csv文件不存在 https://www.tapd.cn/55049933/s/1327056 --- .../io/metersphere/api/dto/definition/request/ElementUtil.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java index ca7b5f8671..c6e3d23319 100644 --- a/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java +++ b/api-test/backend/src/main/java/io/metersphere/api/dto/definition/request/ElementUtil.java @@ -125,7 +125,7 @@ public class ElementUtil { boolean isRepository = false; BodyFile file = item.getFiles().get(0); boolean isRef = StringUtils.equalsIgnoreCase(file.getStorage(), StorageConstants.FILE_REF.name()); - String path = StringUtils.join(BODY_FILE_DIR, File.pathSeparator, item.getFiles().get(0).getId(), "_", item.getFiles().get(0).getName()); + String path = StringUtils.join(BODY_FILE_DIR, File.separator, item.getFiles().get(0).getId(), "_", item.getFiles().get(0).getName()); if (StringUtils.equalsIgnoreCase(file.getStorage(), StorageConstants.FILE_REF.name())) { fileId = file.getFileId(); FileMetadata fileMetadata = fileMetadataService.getFileMetadataById(fileId);