From 043d8a18612707663243046aeb164236291cf249 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: Wed, 4 Sep 2024 18:04:58 +0800 Subject: [PATCH] Revert "rollback `unlink` -> `unlinkSync`" This reverts commit 074ac15d0ff9b6f4981717d552aa75d41c50c119. --- src/common/audio.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/audio.ts b/src/common/audio.ts index 80cc599e..2de0fe30 100644 --- a/src/common/audio.ts +++ b/src/common/audio.ts @@ -38,7 +38,7 @@ export async function encodeSilk(filePath: string, TEMP_DIR: string, logger: Log if (code == null || EXIT_CODES.includes(code)) { sampleRate = 24000; const data = fs.readFileSync(pcmPath); - fs.unlink(pcmPath, () => {}); + fs.unlinkSync(pcmPath); return resolve(data); } logger.logError(`ffmpeg 处理失败: code=${code ?? 'unknown'} sig=${signal ?? 'unknown'}`);