From 7d587c15bf9d6828a76e1eaa9d0873ca03ff47e7 Mon Sep 17 00:00:00 2001 From: educoder Date: Mon, 24 May 2021 17:04:40 +0800 Subject: [PATCH] =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecsonar/services/SonarService.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/net/educoder/ecsonar/services/SonarService.java b/src/main/java/net/educoder/ecsonar/services/SonarService.java index 22b2434..ed7699b 100644 --- a/src/main/java/net/educoder/ecsonar/services/SonarService.java +++ b/src/main/java/net/educoder/ecsonar/services/SonarService.java @@ -39,25 +39,25 @@ public class SonarService { String savePath = zipSavePath + zipFilename; //1. 下载文件 -// if (index==1) { -// download(zipUrl, savePath); -// } + if (index==1) { + download(zipUrl, savePath); + } //2. 解压目录 String extractPath = zipSavePath + key; -// if (index==1) { -// extract(savePath, extractPath); -// } + if (index==1) { + extract(savePath, extractPath); + } //3. 执行检测 String subPath = "/" + SystemUtil.executeAndGetExitStatus("cd " + extractPath + " && ls | head -1").getOutput(); -// if (index != 1) { -// subPath += "/毕业设计项目个人开发代码"; -//// subPath += "/个人"; -// } else { -// subPath += "/毕业设计项目完整代码"; -//// subPath += "/完整"; -// } + if (index != 1) { + subPath += "/毕业设计项目个人开发代码"; +// subPath += "/个人"; + } else { + subPath += "/毕业设计项目完整代码"; +// subPath += "/完整"; + } log.info("scan zipSavePath: {}, zipFilename: {}, savePath: {}, extractPath: {}, subPath: {}", zipSavePath, zipFilename, savePath, extractPath, subPath);