From ad8af12a10b33bd7bdb876488654318c729239f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=89=8B=E7=93=9C=E4=B8=80=E5=8D=81=E9=9B=AA?= Date: Tue, 10 Sep 2024 18:41:01 +0800 Subject: [PATCH] refactor: fsPromise catch --- src/core/apis/file.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/apis/file.ts b/src/core/apis/file.ts index 4f93f250..058f43f7 100644 --- a/src/core/apis/file.ts +++ b/src/core/apis/file.ts @@ -207,7 +207,9 @@ export class NTQQFileApi { throw new Error('文件异常,大小为0'); } if (converted) { - fsPromises.unlink(silkPath); + fsPromises.unlink(silkPath).then().catch( + (e) => this.context.logger.logError('删除临时文件失败', e) + ); } return { elementType: ElementType.PTT,