Ver código fonte

统一下载执行程序的前缀~

hl 9 meses atrás
pai
commit
564e9b48cf
1 arquivos alterados com 2 adições e 11 exclusões
  1. 2 11
      src/utils/file.js

+ 2 - 11
src/utils/file.js

@@ -137,17 +137,8 @@ function readLastNLines(dirPath, filePathList, n) {
             break
         }
     }
-    // const fileList = filePathList.map((item) => {
-    //     var filepath = dirPath + "/" + item
-    //
-    //     logger.info("日志文件:" + filepath)
-    //     const content = fs.readFileSync(`${filepath}`, "utf8");
-    //     let lines = content.trim().split("\n");
-    //     return {
-    //         filePath: item,
-    //         lines: lines,
-    //     };
-    // });
+    fileList.reverse();
+
     const allFile = [].concat(...fileList.map((item) => item.lines));
     let lastNLines = allFile.slice(-n).join("\n");
     return lastNLines.split("\n").reverse();