|
@@ -101,11 +101,13 @@ function getLastFile(dirPath, number, callback) {
|
|
|
logger.info(`--------02`,files,dirPath)
|
|
|
let fileList = [];
|
|
|
for (file of files) {
|
|
|
+ logger.info(`--------02..00`,dirPath,file)
|
|
|
const filePath = path.join(dirPath, file);
|
|
|
logger.info(`--------02..111`,filePath)
|
|
|
const stats = await fs.promises.stat(filePath);
|
|
|
logger.info(`--------02..22222`,stats)
|
|
|
fileList.push({name: file, time: stats.mtimeMs});
|
|
|
+ break
|
|
|
}
|
|
|
logger.info(`--------03`)
|
|
|
fileList.sort((a, b) => b.time - a.time);
|