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);