From be2a19949b0e29a6ebffcb2ff68bd514d3d24e92 Mon Sep 17 00:00:00 2001 From: whyour Date: Wed, 30 Mar 2022 11:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=8E=B7=E5=8F=96=E6=97=A5?= =?UTF-8?q?=E5=BF=97=E7=9B=B8=E5=AF=B9=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/cron.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/back/services/cron.ts b/back/services/cron.ts index 90d1d045..1a7dd6c8 100644 --- a/back/services/cron.ts +++ b/back/services/cron.ts @@ -360,7 +360,7 @@ export default class CronService { } if (doc.log_path) { - const relativeDir = `${doc.log_path.replace(/\/[^\/]\..*/, '')}`; + const relativeDir = path.dirname(`${doc.log_path}`); const dir = path.resolve(config.logPath, relativeDir); if (existsSync(dir)) { let files = await promises.readdir(dir);